using HTML_Template_Flexy with radio buttons

From: Date: Thu, 20 May 2004 14:04:36 +0000
Subject: using HTML_Template_Flexy with radio buttons
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12655@lists.php.net to get a copy of this message
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: // radio buttons $elements['test_radio'] = new HTML_Template_Flexy_Element; $elements['test_radio']->setValue('yes'); Insted i have to do: if($foo == 'yes') { $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? Ângelo

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