Home > Archive > PHP Pear > March 2006 > Re: [PEAR] Formbuilder: Empty date as default
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR] Formbuilder: Empty date as default
|
|
| Justin Patrin 2006-03-23, 7:01 pm |
| 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' =3D> array('d' =3D> '', etc...)));
--
Justin Patrin
| |
| Mads Lie Jensen 2006-03-27, 3:59 am |
| On Thu, 23 Mar 2006 12:51:23 -0800, papercrane@gmail.com ("Justin
Patrin") wrote:
>
>$form->setDefaults(array('dateField' => array('d' => '', etc...)));
That's it - thanks for the help.
--
Mads Lie Jensen - mads@gartneriet.dk - ICQ #25478403
Gartneriet - nu ny indpakning (delvist i hvert fald): http://www.gartneriet.dk/
|
|
|
|
|