How can I create multiple choice radio buttons in contact form

(cyclingone) #1

Hello all…

I’m trying to create a non-standard contact form…one that has 12 radio button selections. I’ve created the form…problem is that it will only allow one button selection at a time. Can anyone give me some code (or other advice)that will allow me to set up the form so that a client can check off as many choices as he/she wants.

Thanks Barry (cyclingone)

(Mark Harradine) #2

You should use check boxes rather than radio buttons. Radio buttons are for making a single choice from a group of choices… Only one can be chosen.


(Rob Beattie) #3

I think the only way you can do it with the built-in contact form page is to create one field per radio button and not use a label for any of them. Trouble is, this will just produce a long list of options when what you probably want to do is have them in columns or laid in another, more elegant way.

Will Woodgate has some really useful stuff on hacking the contact form here

But in the end you might be better off with a third party solution. Have a look at the Addons section in Rapidweaver Community and look for forms stacks or forms plugins.

There are also some external services that some people here swear by but those may be a bit overkill for your needs. A Stacks-based form builder will certainly be able to do what you want.

(cyclingone) #4

Actually Mark, I find that check boxes won’t work for multiple choice. When I tried that, it only gave me one box for the subject and nothing for the list of 12 choices. And there was no way to add a check box for each of the individual choices. Radio buttons, on the other hand, gave me 12 buttons but you can only choose one button…when you try to choose multiple buttons it will only show one at a time.

Thanks for trying…


(Mark Harradine) #5
<form action="#" method="post">
<input type="checkbox" name="veg_choice_1" value="potato">I like potatoes</input>
<input type="checkbox" name="veg_choice_2" value="tomato">I like tomatoes</input>
<input type="submit" name="submit" value="Submit"/>

Would something like the above not work for you??? You will likely need some PHP code to grab the data and populate a database too. Lots of options for RW users, such as those mentioned above. Depending on what you are looking to do, Sitelok by @vibralogix might be a good solution.