I have a form and it contains multiple input fields. What if i don’t provide an id or name to each and every field. will that field be submitted with some default name or won’t be submitted at all.
This is just a query. No code involved.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Form controls without names cannot be successful controls and will not be submitted.
The value of a control without a name will not be included in the submitted form data.
See HTML 4:
or HTML 5:
The id is irrelevant to the success of a control. Only the name matters there.
The id is still important to include as it is the best way to associate a
<label>element with a control (and has other uses via JS and CSS).