I do not know how I can "merge" them so that I only need a <input type=submit />
for the three instead of creating a Submit
for each
-
Is there any way to do this?
- Yes , where can I find documentations ?
I do not know how I can "merge" them so that I only need a <input type=submit />
for the three instead of creating a Submit
for each
Is there any way to do this?
Assuming you want to send all the data in the same submit and that uses jQuery
, I'll propose the following solution:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script><formid="form-1">
//seus campos aqui
</form>
<form id="form-2">
//seus campos aqui
</form>
<form id="form-3">
//seus campos aqui
</form>
<input type="submit" id="submit-forms"/>
<script>
$(function(){
$('#submit-forms').click(function(){
window.location.href = "urldesubmit.com.br?" + $('#form-1').serialize() + '&' + $('#form-2').serialize() + '&' + $('#form-3').serialize();
});
});
<script>
It's a bit of a gambiarra, but it should work.