Page 1 of 1

<Solved>Datepicker in Formbuilder

Posted: Fri Nov 16, 2007 8:47 pm
by Neo
Hi all,

I was using Formbuilder module to build a form. I have a date field in my form and used the datatype "Datepicker". In the Form template, I used the code below to display it in the UI.

Code: Select all

<tr>
    <td align="right"><p>Date submitted {$date->required_symbol}:</p></td>
     <td>{$date->input}</td>

</tr>
But in the UI, instead of displaying the field, it displays the string "Array". Not sure if there is any other way of specifying the date field in the template.

The URL for the form is below.

http://ww2.ce.gatech.edu/Employers/Submit-Job-Posting/

Any pointers to this would be very helpful.

Thanks,
Neo

Re: Datepicker in Formbuilder

Posted: Fri Nov 16, 2007 10:21 pm
by Nullig
The datepicker is a multipart field. if you look in the sample templates the code looks like this:

Code: Select all

{if $entry->multiple_parts == 1}
    	{section name=numloop loop=$entry->input}
       		{if $entry->label_parts == 1}
       			<div>{$entry->input[numloop]->input} {$entry->input[numloop]->name}</div>
       		{else}
       			{$entry->input[numloop]->input}
       		{/if}
       		{if $entry->input[numloop]->op}{$entry->input[numloop]->op}{/if}
      	{/section}
{else}
       	{if $entry->smarty_eval == '1'}{eval var=$entry->input}{else}{$entry->input}{/if}
{/if}
Nullig

Re: <Solved>Datepicker in Formbuilder

Posted: Tue Nov 20, 2007 7:38 pm
by Neo
Hi Nullig,

Thanks a lot. That resolved the problem  :)

Regards,
Neo