QuickForm dates
| From: | Graham Clarke | Date: | Sat, 21 Jun 2003 22:47:28 +0000 |
| Subject: | QuickForm dates | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-6167@lists.php.net to get a copy of this message | ||
Hi - Some questions about using date fields:
1) What's the syntax for setting a default value for a date field like this?
$form->addElement('date', 'dob', 'DoB');
2) If I want to use a regular text box for my date -- like below, how can I validate it as a date??
$form->addElement('text', 'dob', 'DoB');
$input = &$form->getElement('dob');
$input->setSize(15);
$input->setMaxLength(15);
Thanks
Graham
Graham Clarke
GrahamC@53Tech.com
www.53Tech.com
603.643.9955