How to give validation to radio buttons before page redirect to contact form

Question!

i have developed a survey form with the help of html and css. I want to give validation to question before page redirect to Contact form. In Survey form when user click in submit button page will redirect to contact form. but i want to put validation so that user has to click on all question before page redirect to contact form.



Answers

You just need to set the required-attribute for one input of the radiogroup, but you can set it for all. use the required field validator or refer the link below http://www.chennaisunday.com/jsradio.html

By : abdul


To make sure all fields are filled before submission of the form:

<input type="radio" required>

The ' required ' attribute makes sure all fields are filled before the form can be submitted.



I don't have the privalage to comment but you can use the required field as follows

 <input type="radio" name="question-1-answers" id="question-1-answers-A" value="A" required=true />

using this way the user will have to click all the required fields before submitting a form.



This video can help you solving your question :)
By: admin