Re: Quickform frozen elements

From: Date: Fri, 15 Aug 2003 06:24:01 +0000
Subject: Re: Quickform frozen elements
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7219@lists.php.net to get a copy of this message
Hi! Jeroen van Vlierden wrote:
I am using the following construction to make sure people don't alter data which they aren't supposed to alter $form = new HTML_QuickForm('Members', 'POST'); $form->addElement('text', 'NUMBER', 'NUMBER'); $el = $form->getElement('NUMBER'); $el->freeze();
There should be $el =& $form->getElement('NUMBER'); or else you are freezing a copy of the element. Besides, do you actually set the elements value somehow?
or the alternative way $form->addElement('static', 'NUMBER', 'NUMBER');
Static elements do not have submit values. This is the intended behaviour.

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