KumbaThought KumbaThought - 1 year ago 57
Javascript Question

Drupal / jQuery / CSS :: Wrap radio button label in span tag?

When a radio button is rendered in Drupal, it comes out like:

<label class="form-radio" for="sample">
<input type="radio" name="samp" value="1" />Sample

I've been looking at theming functions (namely, theme_radios and theme_form_element, but can't figure out how to render the output like

<label class="form-radio" for="sample">Sample</label>
<input type="radio" name="samp" value="1" />.

Can someone point me in the right direction? Been combing the forums but haven't found anything to help... I'd even be happy with a jquery solution...

Answer Source

You can try this after the page is loaded