How can two forms share the same inputs? I have two forms, one for two different paths... if i wanted to get the user to enter their name, but only once.... how could both forms get hold on this field?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
In
HTML5
you could do it withoutJavaScript
. Do one form with one set of inputs, and just make two submit buttons using a different formaction attributes found on Mozilla Developer Network like this:Using JavaScript you could set one field's value to another's.
Something like:
Put that code in the onblur event for your first form.
So: