Multiple Forms With Input Fields With The Same Name Attribute? Good Or Bad?
Solution 1:
Agree with above answer. Name is totally ok, and will be passed as response parameter of your form. Different story would be if your input elements would have same id's as well - some browsers might have problems traversing dom of your document.
Again, think of bunch of radio buttons, where users can select gender etc. They must have same name (but different id's)...
Solution 2:
Solution 3:
yes that's perfectly fine.. in fact i personally feel that its really a good practice to do so as it turns relatively pretty handy for developers to work with relatively less names as compared to bunch of them.. moreover when elements are on different forms it dose not cause name space collision in any way since to identify elements in js by name we use both form name as well as input field name so it dose not cause any issues...
Post a Comment for "Multiple Forms With Input Fields With The Same Name Attribute? Good Or Bad?"