For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > July 2005 > quickform, validation of date element









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 quickform, validation of date element
Julien Tschäppät

2005-07-30, 5:00 pm

Hi,

I have problem to add a rule for a date element
($form->addElement('date', 'testDate', 'Date: ', $options) ). I tried
with $form->addRule('testDate', 'date required', 'required') but that
don't work. I saw somewhere that I have to use a GroupRule. I don't
understand how I have to do that. Can someone help me ?

my form :=20

$form =3D new HTML_QuickForm('test', 'post');
$options =3D array('addEmptyOption' =3D> true);
$form->addElement('date', 'testDate', 'Date: ', $options);
$form->addElement('submit', 'submit', 'Test');



Julien
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com