Re: HTML_QuickForm2: Setting default values
| From: | Mark Wiesemann | Date: | Tue, 13 Jan 2009 19:57:25 +0000 |
| Subject: | Re: HTML_QuickForm2: Setting default values | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-29591@lists.php.net to get a copy of this message | ||
Christian Weiske wrote:
> Is there a way to set default form values in a QuickForm2 form? There
> is no setDefaults as it were in QF1.
$val = array(...);
$form->addDataSource(new HTML_QuickForm2_DataSource_Array($val));
An example of this can be found in docs/examples/basic-elements.php.
Regards,
Mark
--
http://www.markwiesemann.eu