Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #491 when to addGroup("radio",$key) is passed key=0 name is not displayed
Submitted: 2003-12-24 14:19 UTC
From: webmaster at detectomania dot com Assigned:
Status: Bogus Package: HTML_QuickForm
PHP Version: 4.3.4 OS: Linux Debian 2.4
Roadmaps: (Not assigned)    
Subscription  


 [2003-12-24 14:19 UTC] webmaster at detectomania dot com
Description: ------------ When $key value = 0 and I try to add a radio element form, the property 'name="0"' it´s not displayed, but it works right when $key = string. $form->addGroup("radio", $key,$foo,$foo) << $key = 0 >> <input value="0" type="radio" id="qf_bab5ac" checked="checked" /> << $key = 1 >> <input value="0" type="radio" id="qf_9c3bc0" name="1" checked="checked" /> Reproduce code: --------------- $form->addGroup("radio", $key , "title":',"< /BR>"); Expected result: ---------------- << $key = 0 >> <input value="0" type="radio" id="qf_9c3bc0" name="0" checked="checked" /> Actual result: -------------- << $key = 0 >> <input value="0" type="radio" id="qf_bab5ac" checked="checked" />

Comments

 [2004-02-28 22:07 UTC] avb
Cannot reproduce the problem, using $form->addElement('radio', 0, 'Radio:', 'text', 0, array('id' => 'foo')); yields <input id="foo" name="0" value="0" type="radio" checked="checked" /><label for="foo">text</label> in output, as expected. As "Reproduce Code" is obviously broken, the problem most likely is somewhere else in user code.