Re: Formbuilder: Empty date as default
| From: | Justin Patrin | Date: | Thu, 23 Mar 2006 20:51:23 +0000 |
| Subject: | Re: Formbuilder: Empty date as default | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23420@lists.php.net to get a copy of this message | ||
On 3/22/06, Mads Lie Jensen <mads@gartneriet.dk> wrote:
> Hi
>
> I'm using DB_DO and Formbuilder.
> In one form, I have several date-inputs, using dropdowns. I have a
> selectAddEmpty on one of these dates, and there is an empty element at
> top of each day/month/year dropdowns for this date. In the database this
> date can be NULL, and the form accepts an empty element as input.
>
> But, when displaying a new form, the current date is selected in this
> field - I would like it to be empty as default. Can this be done?
>
$form->setDefaults(array('dateField' => array('d' => '',
etc...)));
--
Justin Patrin