QF validate
| From: | Mark Steudel | Date: | Fri, 24 Feb 2006 19:34:44 +0000 |
| Subject: | QF validate | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-23120@lists.php.net to get a copy of this message | ||
Lets say you have the following form:
$form = new HTML_QuickForm;
$form->addElement('blah1')
$form->addRule('blah1');
$form->addElement('blah2')
$form->addRule('blah2');
if ( $form->validate() )
{
process
}
else
{
$form->display();
}
When the user fails validation, the form is redisplayed with the values in
the fields, most of the time this is great. But is it possible to clear the
values for certain elements, say blah2? A real world example might be the
credit card information, lots of forms on validation errors just clear the
cc info and require the user to retype it in but still retain the shipping
and billing address.
Thanks, Mark