Skip to content

Instantly share code, notes, and snippets.

@gmelodie
Created January 15, 2019 14:07
Show Gist options
  • Save gmelodie/dd8a2b6a191eef825f790423259c1325 to your computer and use it in GitHub Desktop.
Save gmelodie/dd8a2b6a191eef825f790423259c1325 to your computer and use it in GitHub Desktop.
Health form example with multiple choices in one form
<html>
<form>
<b>How old are you?</b><br>
<input type="radio" name="age" value="0-10"> 0 to 10 <br>
<input type="radio" name="age" value="10-30"> 10 to 30 <br>
<input type="radio" name="age" value="30-50"> 30 to 50 <br>
<input type="radio" name="age" value=">50"> More than 50 <br>
<br>
<b> How much time do you exercise per day?</b><br>
<input type="radio" name="exercise" value="<30"> Less than 30 min<br>
<input type="radio" name="exercise" value="30-90"> 30 to 90 min<br>
<input type="radio" name="exercise" value=">90"> More than 90 min<br>
<br>
<b> Did you like this form? </b><br>
<input type="radio" name="liked" value="yes"> I did! <br>
<input type="radio" name="liked" value="no"> I did not. <br>
<br>
<b>Which parts of my web dev tutorial have you read?</b><br>
<input type="checkbox" name="read" value="part_1"> Part 1 <br>
<input type="checkbox" name="read" value="part_2"> Part 2 <br>
<input type="checkbox" name="read" value="part_3"> Part 3 <br>
<input type="checkbox" name="read" value="part_4"> Part 4 <br>
<input type="submit" value="Submit">
</form>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment