Forum OpenACS Q&A: Re: ad_form problem with multiple dates

Collapse
Posted by Jade Rubick on
Has anybody used ad_form with multiple dates of the same name? What did they do?

I tried modifying the date definitions to look like what Jon has on his ad_form webpage, but to no avail:

        {start_date.$i:date,to_sql(linear_date),from_sql(sql_date)
            {label \"Start date\"}
            {format \"MONTH DD YYYY\"}
            {help}
        }

        {end_date.$i:date,to_sql(linear_date),from_sql(sql_date)
            {label \"End date\"}
            {format \"MONTH DD YYYY\"}
            {help}
        }

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is the relevant portion of the .xql file:

<?xml version="1.0"?>
<queryset>
  <fullquery name="new_task_item">
    <querytext>
    select pm_task__new_task_item (
                null,
        :project_item_id,
                '$task_title($i)',
                '$description($i)',
        to_timestamp('$start_date($i)','YYYY MM DD HH24 MI SS'),
        to_timestamp('$end_date($i)','YYYY MM DD HH24 MI SS'),
                '0',
        now(),
        :user_id,
        :peeraddr,
        :package_id
    );
    </querytext>
  </fullquery>

...

Same error as before.