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

  1. wprunner
    Posted 5 years ago #


    You say that Radio Buttons are required by nature

    and you linked to this document
    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.


  2. Takayuki Miyoshi
    Plugin Author

    Posted 5 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
    Posted 5 years ago #

    Thanks :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic