Support » Plugin: Formidable Forms Builder for WordPress - Contact Forms, Surveys & Quiz Forms Plugin » How to change the HTML structure of radio buttons

  • Hi,

    Anyone knows if the following can be done?

    Formidable currently outputs radio buttons in this structure:

    <label for="field_xtna9-1">
                <input name="item_meta[18]" id="field_xtna9-1" value="Option 2" type="radio"> Option 2
    </label>

    Notice the INPUT is inside the LABEL. Aside from the fact that I believe that is semantically incorrect, it is not allowing me to use jQuery UI Buttons.

    Is there any function or override to output the HTML is as follows?

    <input name="item_meta[18]" id="field_xtna9-1" value="Option 2" type="radio">
    <label for="field_xtna9-1">Option 2</label>

    Many many thanks!

    https://wordpress.org/plugins/formidable/

Viewing 1 replies (of 1 total)
  • Plugin Contributor jamie.wahlin

    (@jamiewahlin)

    Hello,

    I would be happy to point you to some example code for modifying radio button or checkbox HTML if you would like. You’ll just need to post your question in our help desk using an account that includes support:
    https://formidablepro.com/help-desk/

    Also, I have done quite a bit of research about what HTML is considered correct or incorrect semantically for radio and checkbox fields. There are a couple of syntaxes that are considered correct and putting the input inside of the label is considered correct and valid according to standard HTML protocol. A little more information on this can be found here:
    http://www.w3schools.com/tags/tag_label.asp

Viewing 1 replies (of 1 total)
  • The topic ‘How to change the HTML structure of radio buttons’ is closed to new replies.