[QuickForm] Default value for a 'date' field?
| From: | Nicolas Hoizey | Date: | Mon, 01 Sep 2003 14:07:23 +0000 |
| Subject: | [QuickForm] Default value for a 'date' field? | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-20954@lists.php.net to get a copy of this message | ||
Hi,
I would like to know if there is a way to set a default value for a 'date' field
in QuickForm.
Here's a part of my script:
$form->setDefaults(array('date' => date('d / M / Y')));
$form->addElement('date', 'in_service_date', 'In service date',
array(
'language' => $p->rs->language,
'format' => 'M / d / Y',
'minYear' => (intval(date('Y')) - 3),
'maxYear' => (intval(date('Y')) + 2)
)
);
I am able to set default values for standard fields (text, radios, etc.) but not
for dates.
I also didn't find any documentation about types creation, such as advanced date
with date selection wizards. Is there anything somwhere?
Thanks.
-Nicolas
--
Nicolas "Brush" HOIZEY
Free PHP projects http://www.phpheaven.net
Veille tous azimuts http://www.gasteroprod.com
Clever Age http://www.clever-age.com