Re: Re: HTML Quick Form preview

From: Date: Tue, 06 Jul 2004 08:04:23 +0000
Subject: Re: Re: HTML Quick Form preview
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13506@lists.php.net to get a copy of this message
Hello, I tried with freeze before but with no luck. Not I figured something like this: // Tries to validate the form if ($form->validate()) { // Form is validated, then freezes the data if ($form->getSubmitValue('preview') == 'ok') { $form->process('myProcess', false); $proces = "done"; } else { $form->freeze(); $form->addElement('hidden','preview','ok'); } } if (empty($proces)) { // display form } And it works. Do you have any other (maybe more correct) idea. -- Best regards, Uros Monday, July 5, 2004, 9:56:39 PM, you wrote: TR> "Uros Gruber" <uros.gruber@sir-mag.com> wrote in message TR> news:1076775988.20040705212931@sir-mag.com... >> Hello! >> >> How can I make somekind of preview before procesing the form. >> >> So if data is validated true then show preview of what user entered and in >> hit ok, thene proces function is executed. TR> Take a look at the freeze() method: TR> http://pear.php.net/manual/en/package.html.html-quickform.html-quickform-ele TR> ment.freeze.php TR> The values will still be available as hidden fields. TR> Regards, Torsten Roehr

« previous php.pear.general (#13506) next »