Re: display of submitted values and an empty form on the same page using Quickform
| From: | Alexey Borzov | Date: | Thu, 03 Aug 2006 16:17:39 +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-24824@lists.php.net to get a copy of this message | ||
Hi,
Bjoern Mittelsdorf wrote:
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... Well... it does not look that complicated now but any suggestions will be appreciated nevertheless.The most bulletproof solution is to create two separate form objects. To make the second form empty you can clear the $_POST (or $_GET) array before creating the form.