In the server side we fetch the form parameters by the form element name. Similarly how to fetch the form parameters in case the input element does not have the name attribute and has the id
attribute?
Asked
Active
Viewed 84 times
0
1 Answers
2
I don't think that is possible. Unless an input element has name
attribute it won't even be submitted in the GET/POST request while submitting the form.
So, my understanding is, to read value for any input field in html (on server side) we need to have name
attribute defined on it.
Going through w3c specs at HTML specification, it says that the first step that happens during form submissions is Step one: Identify the successful controls. And successful control is the one that has Control name defined on that field. i.e, the name attribute .

Madhusudana Reddy Sunnapu
- 8,064
- 2
- 18
- 29