Re: HTML_QuickForm question: fields that don't maintain state?

From: Date: Wed, 20 Oct 2004 10:30:38 +0000
Subject: Re: HTML_QuickForm question: fields that don't maintain state?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14992@lists.php.net to get a copy of this message
On Wednesday 20 October 2004 11:17, Alexey Borzov wrote: > Please clarify. I have a selectbox on a page. $form->addElement('select', 'name', 'caption', $values); I want this selectbox's state (ie, current selected value) not to be kept by HTML_QF. If a user changes this entry, then submits the form, when the form is displayed again I require this select box to be defaulting to the first entry again. I know I can setValue() before I display the form. I also know I could add this manually as a 'static' element, and do the HTML for the selct box manually. I'm just wondering if there is a way of doing something like... $selectBox =& $form->createElement('select', 'name', 'caption', $values); $selectBox->maintainState(false); $form->addElement($selectBox); Kind Regards, Ian P. Christian http://pookey.co.uk

Attachment: [application/pgp-signature]
« previous php.pear.general (#14992) next »