Re: QuickForm 2.4 to 2.5 upgrade problem-- ElementGroup

From: Date: Wed, 27 Nov 2002 10:30:57 +0000
Subject: Re: QuickForm 2.4 to 2.5 upgrade problem-- ElementGroup
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2855@lists.php.net to get a copy of this message
Hi Culley, This was fixed yesterday in radio.php in CVS, thanks to Derick Rethans. This change will be integrated in the next release 2.6 so feel free to check it out now. Your code might have been working before because element values were set differently. Now, they are set in a much more secure and logical way. I recommend you update radio.php to the CVS version. Bertrand Mansion Mamasam le 27/11/02 1:32, culley harrelson à culley@ml1.net a écrit : > The code below worked with Quickform 2.4 but does not work with 2.5. The > default value doesn't carry over from frozen to non-frozen mode... > > <?php > > require_once ("HTML/QuickForm.php"); > $defaultValues['testing']= 't'; > $form = new HTML_QuickForm("form1"); > $form->setDefaults($defaultValues); > $radio[] = &HTML_QuickForm::createElement('radio', null, null, 'Yes', > 't'); > $radio[] = &HTML_QuickForm::createElement('radio', null, null, 'No', > 'f'); > $form->addElementGroup($radio, 'New Window:', 'testing'); > > if (isset($_POST["edit_button"])) { > $form->addElement('submit', 'save_button', 'Save Changes'); > } else { > $form->addElement('submit', 'edit_button', 'Edit Values'); > } > > if ($form->validate() && isset($_POST["save_button"])) { > echo "done"; > exit; > } > > if (!isset($_POST["edit_button"])) { > $form->freeze(); > } > > $form->display(); > > > ?> >

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