Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

25 lines
1.0 KiB
Markdown

---
title: Use the value attribute with Radio Buttons and Checkboxes
---
# Use the value attribute with Radio Buttons and Checkboxes
---
## Problem Explanation
To pass the challenge, add the `value` attribute to the `input` elements of type `checkbox` and `radio`. Use the `input` label text, in lowercase, as the value for the attribute. The `value` attribute will make sure the choices are identifiable when the form is submitted.
Example form with value attributes:
```html
<form action="/submit-sandwich">
<label><input type="radio" name="bread" value="wheat"> Wheat</label>
<label><input type="radio" name="bread" value="ciabatta"> Ciabatta</label><br>
<label><input type="checkbox" name="fillings" value="chicken"> Chicken</label>
<label><input type="checkbox" name="fillings" value="tuna"> Tuna</label>
<label><input type="checkbox" name="fillings" value="mayo"> Mayo</label><br>
<textarea placeholder="Allergies, and extra information"></textarea><br>
<button type="submit">Order Sandwich</button>
</form>
```