resettings HTML Quickform elemetns
| From: | Ian P. Christian | Date: | Tue, 28 Jun 2005 16:42:38 +0000 |
| Subject: | resettings HTML Quickform elemetns | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19806@lists.php.net to get a copy of this message | ||
This seems like a nasty hack:
1 <?
2 require_once 'HTML/QuickForm.php';
3
4 $form = new HTML_QuickForm();
5 $form->addElement('text', 'test','test');
6
7
8 $form->validate();
9 $form->display();
10
11 require_once 'Var_Dump.php';
12
13 Var_Dump::display($form);
14 $form->_submitValues = array();
15 foreach($form->_elements as $element) {
16 $element->setValue('');
17 }
18 $form->validate();
19 $form->display();
20
21 Var_Dump::display($form);
Is there a better way to reset the form completely are re-display it?
Kind Regards,
--
Ian P. Christian ~ http://pookey.co.uk
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]