Re: Can you serialize a Formbuilder object?
| From: | Alexey Borzov | Date: | Mon, 04 Jul 2005 09:15:01 +0000 |
| Subject: | Re: Can you serialize a Formbuilder object? | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19858@lists.php.net to get a copy of this message | ||
Hi,
Justin Patrin wrote:
First of all, there is a documented method for loading the submit values into HTML_QuickForm_Page object: http://pear.php.net/manual/en/package.html.html-quickform-controller.html-quickform-page.loadvalues.php Second, it is not a good idea to make blanket statements like "package X is a horrible hack", without any arguments to back them up.You mean put the form values back in the form? Since HTML_QF_Controller is a hack (yes, it's a horrible hack) it's not too easy to do this. However, I believe that the HTML_QF_Controller package supports this intrinsically...you can always pass the posted array to setDefaults.I actually meant regenerate the form. The normal way to use FormBuilder is to regenerate the form on every request, even when a form is submitted.Would you please tell me how to repopulate the form values previously obtained after the new form is regenerated?