How can I adjust the position of a label for a zend form Radio element?
- by murze
Hi,
with this piece of code
$feOnline = New Zend_Form_Element_Radio('online');
$feOnline->setValue($article->online)
->addMultiOptions(array(0=>'offline', 1=>'online'))
->setLabel('Online');
this html is generated
<dd id="online-element">
<label for="online-0">
<input type="radio" checked="checked" value="0" id="online-0" name="online">offline
</label><br>
<label for="online-1"><input type="radio" value="1" id="online-1" name="online">online
</label>
</dd>
However I don't want the input-tag inside the label-tag. No need for the "" either...
What decorators must I add to get this output?
<dd id="online-element">
<input type="radio" checked="checked" value="0" id="online-0" name="online"><label for="online-0">offline</label>
<input type="radio" value="1" id="online-1" name="online"><label for="online-1">online</label>
</dd>