WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Set a default value for radio buttons (set to "on") (3 posts)

  1. wprunner
    Member
    Posted 3 years ago #

    Hello,

    You say that Radio Buttons are required by nature
    http://contactform7.com/2009/11/20/checkboxes-radio-buttons-and-menus/

    and you linked to this document
    http://www.w3.org/TR/html401/interact/forms.html#radio
    to emphasize.

    However, they state that not all user agents behave the same way (Chrome for example does not set any radio button) and that you should make sure to set one radio button to "on".

    That's ok, but you don't give a way in the form tag generator to set value "on" to a certain radio button.

    (it means that it is possible to submit the form without setting any radio button)

    Please add such feature so that we can always have a button set to on.

    Thanks.

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    Not a bad idea, but I think you don't necessarily need to be able to do all configurations in the tag generator. Instead, you can set default:(num) option manually like this:

    [radio your-country default:2 "China" "India" "San Marino"]

    (This example checks "India" by default.)

  3. wprunner
    Member
    Posted 3 years ago #

    Thanks :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic