I have 2 forms. One called clientcapture and one called quotecapture.
At the end of client capture are 4 tabs which the user clicks to choose between different types of quotes. When they click on the tabs I wipe quotecapture with the following function:
$("#quotecapture")[0].reset();
Obviously I do not want to reset clientcapture as this contains the user information.
This leaves me with a problem. I would like to POST the data as one request to the action page so that I can link the quote to the client based on their entries into a database. Once entering the client I wanted to retrieve the insert_id to tie to the quote.
I tried the following but obviously not the desired affect. Only 1 form submits, or at least - one overrides the other.
$( "#submit" ).click(function() {
$( "#quotecapture" ).submit();
$( "#clientcapture" ).submit();
});
Any suggestions on either how to improve the reset so that I can have 1 form or how i can somehow merge the forms and submit together would be appreciated.
Thanks
Aucun commentaire:
Enregistrer un commentaire