Re: using HTML_Template_Flexy with radio buttons
| From: | Alan Knowles | Date: | Mon, 24 May 2004 06:29:31 +0000 |
| Subject: | Re: using HTML_Template_Flexy with radio buttons | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12696@lists.php.net to get a copy of this message | ||
cron@odi.com.br wrote:
Hello, I´m using the this code with HTML_Template_Flexy , it is a copy and paste from the docs: // radio buttons $elements['test_radio'] = new HTML_Template_Flexy_Element; $elements['test_radio']->setValue('yes'); with this html template: <input name="test_radio" type="radio" value="yes">yes<BR> <input name="test_radio" type="radio" value="no">no<BR> I get the error: Error on Line XX <INPUT>: Radio Input's require an ID tag.. So i added id tags in the radio butons like: <input name="test_radio" id="radio1" type="radio" value="yes">yes<BR> <input name="test_radio" id="radio2" type="radio" value="no">no<BR> But that is a big problem because the docs say to do:Fixed the docs.. thanks.
// radio buttons $elements['test_radio'] = new HTML_Template_Flexy_Element; $elements['test_radio']->setValue('yes'); Insted i have to do: if($foo == 'yes') {yeah.. - you could try <input name="test_radio" id="radio1" type="radio" value="yes">yes<BR>$elements['radio1'] = new HTML_Template_Flexy_Element; $elements['radio1']->setValue('yes');} else {$elements['radio2'] = new HTML_Template_Flexy_Element; $elements['radio2']->setValue(´no´);} Is this a expected behavior?
<input name="test_radio" id="radio2" type="radio" value="no" selected>no<BR>to default it. Regards Alan
Ângelo-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com