Sahar Nasiri7,454 Points
Input and Value
Why do Nick add value to the input in this video? we didn't use value!
For the input types we saw before this video (i.e. text, email, password), whatever the user types in is considered to be the "value" of that input element. To illustrate this better, check out the code below. Both lines send over the same "value" to the server when you submit the form:
<!-- You type in "Sahar" in the input field --> <input type="text" id="name" name="user_name"> <!-- When the form loads in your browser, the field will be pre-populated with "Sahar" --> <input type="text" id="name" name="user_name" value="Sahar">
Radio buttons are just another type of input element where the type is set as "radio". Instead of having a user type something in, we want each radio button to have a specific value. So for this particular video, if we click "Under 13" and submit our form, then we send the value of "under_13" to the server. Same with "Over 13" - once we submit the form, we send the value of "over_13" to the server.
jeremy hudson2,589 Points
it could have been a example but he will go over what he did in future videos but if your willing to visit w3schools every little info is on there happy coding