QF: Freezing elements

From: Date: Mon, 10 Nov 2003 21:43:43 +0000
Subject: QF: Freezing elements
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8857@lists.php.net to get a copy of this message
Hi, I have a form with a date element on it. There is also a checkbox element, and a submit button. When the form first loads I would like to have the date element frozen. How do I define this? I found the freeze() method, but cannot connect the element to the main form object. $entryElement = &HTML_QuickForm::createElement('date', 'entryDate', $this->language['L_InputDate'], array('language' => $_SESSION['_lang'])); $entryElement->freeze(); I do not understand how to add the $entryElement to the $form without adding it in to a Group. When the user clicks the checkbox to =1, submits the form the date element should be editable - which would simply be a case of calling, or not calling, the $entryElement->freeze() method :-) Regards, -- Mike Carter ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________

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