RE: [PEAR] HTML_QuickForm With Arrays as Text Elements?
| From: | Mike Carter | Date: | Wed, 05 Nov 2003 15:31:13 +0000 |
| Subject: | RE: [PEAR] HTML_QuickForm With Arrays as Text Elements? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8775@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: James 'Chip' Kaufman [mailto:jkaufman@wamnetgov.com]
>
> What is the correct way of doing this sort of thing:
>
> $form->addElement ('text', "reqdate[]", 'Req. Start',
> array('size'=>'10', 'id'=>'sd0'));
> $form->addElement ('text', "reqdate[]", 'Req. Start',
> array('size'=>'10', 'id'=>'sd1'));
>
> I need to validate the data using Javascript, and $reqdate[]
> will look
> like:
> reqdate[0] = '12/15/2003'
> reqdate[1] = '01/22/2004'
>
> I know how to do it w/o QuickForm. Can it be done with QuickForm?
Use the quickform addRule() method to apply a regular expression, or to link
a javascrip/PHP function for when a user clicks the forms submit button.
Regards,
Mike C.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________