I have a logic issue maybe someone can explain how I can achieve this.
- I have 2 forms that work together.
- Form 1 is required to get the lead in, its about 3 fields.
- Form 2 is a pop-up after you click send from Form 1. Form 2 is optional.
- Client wants only to get one email for their lead system.
- I'm using PHPMailer, jQuery & Ajax for this.
- I already auto-populate some of the data into Form 2 from Form 1 into hidden fields to include in the email.
The only thing I can think of is adding some kind of time limit. Don't send form 1 for 10 minutes, if form 2 is filled out then only send form 2 since it already has the info from form 1. If 10 minutes passes without form 2 being filled out send form 1.
If not maybe I need to some how reconsider how the UX works with only 1 form.
The question is, how do submit both forms but only include it one email if the first form is mandatory? I need a way to capture the second form IF it is filled out before the first one is actually send and merge them.
Any help is appreciative!
Thank you,