Re: addGroupRule and * denotes required field

From: Date: Sun, 18 May 2003 20:11:38 +0000
Subject: Re: addGroupRule and * denotes required field
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5432@lists.php.net to get a copy of this message
Culley, It should work. You should make sure your installation is ok, try to clean install by removing the QuickForm directory maybe. I remember you told a few weeks ago about some other problems you had of multiple class declaration. These might be related. Bertrand Mansion Mamasam <culley@fastmail.fm> wrote : > > I forgot that I reverted back to 2.1 a few weeks ago for some reason so > I was testing agianst 2.1. But I just tested this exact code against > 3.0Beta2 and got the same result-- there was no * indicating the group > contained required elements. Default renderer. > >> This code works for me: >> >> require_once('HTML/QuickForm.php'); >> $form = new HTML_QuickForm(); >> >> $group[] =& HTML_QuickForm::createElement('text', 'city'); >> $group[] =& HTML_QuickForm::createElement('text', 'state'); >> $group[] =& HTML_QuickForm::createElement('text', 'zip'); >> $form->addGroup($group, 'city_state_zip', 'City, State, Zip:'); >> $form->addElement('submit', 'submit'); >> >> $address_rules['city'][0] = array('City is required', >> 'required'); >> $address_rules['state'][0] = array('State is required.', >> 'required'); >> $address_rules['zip'][0] = array('Zip Code is required', >> 'required'); >> $form->addGroupRule('city_state_zip', $address_rules); >> >> $form->display(); >> >> Which renderer are you using ? >> >> Bertrand Mansion >> Mamasam >> >> >> >> >

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