Default radio widget creates a following structure:
<label>...</label>
<div id="...">
<div class="clearfix prettyradio labelright blue">
<input type="radio" id="..._0" name="..." value="..." style="display: none;">
<a href="#" class=""></a>
...
</div>
I found the radio_widget block, but it contains only an input itself. So I can customize there only this part:
<input type="radio" id="..._0" name="..." value="1" style="display: none;">
But I can’t understand how to change whole the structure of radio choice field?
Also, does anybody knows, why symfony adds display:none to the input?
Thanks.
if you’re using Radio Field Type, you can customize only the
inputpart of theradio_widgetblock by callingform_widget(form.yourField), all it displays is,But if you’re using Choice Field Type to display Radio Fields
(expanded => true and multiple => false). You’ll then have to override thechoice_widgetblock, which call for each child element theradio_widgetblock surrounded by a globaldivHow did you get the “display:none”? because there’s no style such this in the default block.