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.
How to give validation to radio buttons before page redirect to contact form
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.