Reputation: 176
I would like to know if its possible to process 2 forms at once? my scenario is this:
I have a contact page on my website which consists of:
1) Customer Details
2a) General Enquiry
2b) Get Quote
2c) Check Availability
section 1 is always the same is a form on its own, where as section 2 will only show details for one of the options (selectable from drop down box.)
so in total I have 4 forms of which 2 will always be filled in, and i need to process them both to email through to me. I don't want to have to include section 1 at the top of each form if i can help it)
I hope this all makes sense.
Upvotes: 1
Views: 136
Reputation: 913
You can only submit one form at a time. You have a couple of options:
1) Combine the two forms into one form and use CSS/JavaScript to show/hide the relevant fields. This way, all of the form fields will be submitted (including the ones you're not interested in). This is what I would do.
2) When the user submits the form, use JavaScript to send the appropriate data to the backend.
Upvotes: 1
Reputation: 1979
Any reason you dont want to make it one form? Seems like it would be a lot easier to make it one form and do all of the processing on the other side.
Upvotes: 1