I need to separate the form into 2 different divs, on the same page. I tried the following and it did not work:
<div id="div1">
<form method="post">
<input type="text" name="Nome">
</form>
<button onclick="exibediv2()">
</div>
<div id="div2">
<form method="post">
<input type="text" name="Cidade">
<input type="submit">
</form>
<button onclick="exibediv1()">
</div>
When I use submit on the second form, it does not recognize the value of the first input. How do I resolve this?
[ Added due feedback from comments ]
When I leave as a single
<form>
the firstbutton
acts as asubmit
.