One Input Field, Multiple Names
Solution 1:
It is not possible without JavaScript. Hidden input fields are just static data, as far as HTML is concerned; they are not affected by user input in any way. Similarly, when user input changes the value of a field, there is no way in HTML to specify that this would also change another field.
The statement “I’d like to use both attributes for different websites, which use different names for the same property” seems to suggest that the form data is to be submitted to one of two or more servers depending on something. Although this is technically possible without JavaScript if certain HTML5 features are used, their browser support is limited. The feasible options are: 1) Use different forms, 2) Use JavaScript, 3) Use a simple server-side mediator that passes the data forward to one or more server-side handlers depending on some field(s) in the data.
Post a Comment for "One Input Field, Multiple Names"