How to make multiple forms with shared fields?
<input type=text name=username />
<form action="/users">
... some fields ...
</form>
<form action="/admins">
... some another fields ...
</form>
How to make multiple forms with shared fields?
<input type=text name=username />
<form action="/users">
... some fields ...
</form>
<form action="/admins">
... some another fields ...
</form>
Having two forms share an element is not possible without JavaScript.
You can't have two form elements overlap or nest each other; so, a form element can't be in two forms at once.
What do you want to achieve?
You really only need one form if youre processing server side. just use array naming for the form fields and submit buttons like:
global[my-field-name]
action[specific-submit-action]
specific-submit-action[my-field-name]
then in what ever you are using to process you can merge/combine the specific-submit-action
and global
arrays/hashes and do things with the data depending on the action[specific-submit-action]
.