Removing <label> on group radio buttons
| From: | Louie Miranda | Date: | Mon, 24 Nov 2008 02:02:53 +0000 |
| Subject: | Removing <label> on group radio buttons | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-29442@lists.php.net to get a copy of this message | ||
*From this example..
----
**
Grouping Radio Buttons *
Creating a group of radio buttons with the same name but different values
requires a slightly different syntax. The radio buttons should be created
with no name or label, just text and value. For example, the following are
three radio buttons in a group, each corresponding to one meal:
$meals[] =&
HTML_QuickForm::createElement('radio',null,null,'Breakfast','br');
$meals[] =&
HTML_QuickForm::createElement('radio',null,null,'Lunch','lu');
$meals[] =&
HTML_QuickForm::createElement('radio',null,null,'Dinner','di');
$form->addGroup($meals,'meal','Meal: ','<br>');
Because each of the radio buttons in the group have no name of their own,
they each take their name from the group name: meal. They have identical
names but different values. Only one of the values is submitted with the
form. For example, if the Breakfast radio button is selected, then the
submitted form variable meal has the value br. The following is what the
HTML looks like for this group of radio buttons:
<tr>
<td align="right" valign="top"><b>Meal: </b></td>
<td valign="top" align="left"><input value="br"
type="radio" id="qf_a8704d"
name="meal" /><label for="qf_a8704d">Breakfast</label><br>
<input value="lu" type="radio" id="qf_39a433" name="meal"
/><label
for="qf_39a433">Lunch</label><br>
<input value="di" type="radio" id="qf_c5fabd" name="meal"
/><label
for="qf_c5fabd">Dinner</label></td>
</tr>
--
How could I remove the <labels> inside?
<input value="br" type="radio" id="qf_a8704d"
name="meal" />*<label for="qf_a8704d">*Breakfast*</label>*
to
<input value="br" type="radio" id="qf_a8704d"
name="meal" />Breakfast
Thanks!
--
Louie Miranda (lmiranda@gmail.com)
http://www.louiemiranda.net
Security Is A Series Of Well-Defined Steps
chmod -R 0 / ; and smile :)