Re: display of submitted values and an empty form on the same page using Quickform
| From: | Justin Patrin | Date: | Wed, 02 Aug 2006 17:20:16 +0000 |
| Subject: | Re: display of submitted values and an empty form on the same page using Quickform | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24815@lists.php.net to get a copy of this message | ||
On 8/2/06, Bjoern Mittelsdorf <mittelsdorf@zpid.de> wrote:
Hi, I am wondering about an easy way to show the frozen data of a previous submit and the same form with empty fields on the same page. So far I think about freeze() display() unfreeze() setDefaults() display() I use setDefaults because I know of no easy way to iterate through my elements...setDefaults won't work as the values in the request will override the defaults. I would suggest making a copy of the form object before you freeze it, set the internal var with the submitted values to null (sorry, don't remember its name), and calling one of the functions which re-sets the values of elements (such as setDefaults()).
Well... it does not look that complicated now but any suggestions will be appreciated nevertheless.-- Justin Patrin