- Can I have multiple inputs with same name?
- Can a HTML page have 2 forms?
- Can I have multiple form tags?
- Can an input field have two types?
Can I have multiple inputs with same name?
It is valid. It will create no confusion for the server side language (even PHP, with its conventions for naming fields that share a name, will consistently and predictably handle multiple inputs which don't use that convention).
Can a HTML page have 2 forms?
If two or more forms on the same page use the same IDs then the connector hooks into the first form on the DOM. This is because Javascript assumes unique element IDs per HTML standards.
Can I have multiple form tags?
Yes, we can use multiple tags inside one single HTML page. Sometimes we need to submit two distinct data from a single HTML page. To do so we need to use multiple tags.
Can an input field have two types?
No, a field element can't have multiple types. The only thing you should leave up to the user is inputting data - you select the types when designing the form. The user will pick which ones they want to fill out - unless you make them required.