For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > July 2005 > Formbuilder generates extra radio button









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Formbuilder generates extra radio button
Andrew Wooldridge

2005-07-24, 8:39 pm

I'm using the following code to create a yes, no, unknown field using
FormBuilder. The data field is a char(1) in my database. I have the
following lines in my dataobject class. However, the HTML created has a
fourth radio button, without a label, before the others.

---partial listing of options set in data object---
public $y_n_u; // string(1)

$this->fb_linkElementTypes = array('y_n_u' => 'radio');

$this->fb_enumFields[] = 'y_n_u';

$this->fb_enumOptions = array('y_n_u' => array('Y' => 'Y',
'N' => 'N',
'U' => 'U') );

---HTML generated -----

<td valign="top" align="center">
<input name="test1_y_n_u_1" value="" type="radio" id="qf_51da48"
checked="checked" />
<input name="test1_y_n_u_1" value="Y" type="radio" id="qf_47f93e"
/><label for="qf_47f93e">Y</label>
<input name="test1_y_n_u_1" value="N" type="radio" id="qf_4facaf"
/><label for="qf_4facaf">N</label>
<input name="test1_y_n_u_1" value="U" type="radio" id="qf_7a549b"
/><label for="qf_7a549b">U</label></td>

-----------------------------

Has anyone else seen this problem before? -A
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com