Hi @henrietteklindt
I hope you’re well today!
You will need a combination of “pre-populate” field setting and “redirect” behavior of the form. Here’s how to do this:
1. Make sure that the select field in both forms have the very same set of options set (labels and values); make also sure that option values (values, not labels) in both fiels are all lowercase and not use any special characters and spaces/blanks; example of “bad” option value: Airport Number #1 and of “good” value: airport-number-1
2. on the second form (the one to which user is redirected) edit the select field and in its “Settings” section scroll down to “pre-populate” option; in the “Query parameter (optionl) field put word “airport”; apply settings, update the form and put it on the page; open the page in browser and copy its entire URL
3. edit the first form (the one from which user is redirected) and go to its “Behavior” settings; in “After submission” make sure that the behavior “Redirect user to a URL” is added and set the redirect URL as follows:
your_page2_url/?airport={select-1}
where your_page2_url is the URL of page with second form (as copied in step 2).
Then save this form and put it on the Page 1 and that’s pretty much it.
If you direct user to Page 1 they’ll submit the form and be redirected to Page 2; the redirect URL will have ?airport= var appended to it with select value and the select field on the second form will pick it up and automatically select relevant option.
Best regards,
Adam
Adam – thank you so much 😊
I need 2 fields to prepopulate from the same form ”departure airport” and ”arrival airport” is that possible??
And one more thing (sorry to be so difficult) is there any way to be able to use uppercase? Because the IATA aorport codes are uppercase ex. BCN Barcelona-El Prat….
Thank you Again so so so much – you are the hero of the week…
Henriette from Copenhagen – on a rainy day……
Hello @henrietteklindt
I need 2 fields to prepopulate from the same form ”departure airport” and ”arrival airport” is that possible??
Sure, you can have multiple arguments in the URL during the redirection and these can be used to auto-populate multiple fields.
https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#after-submission-behavior
https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#autofill
And one more thing (sorry to be so difficult) is there any way to be able to use uppercase? Because the IATA aorport codes are uppercase ex. BCN Barcelona-El Prat….
Not sure what’s the issue here, can’t you use uppercase labels in those fields? Or are we talking about the actual value instead of a label? Please advise!
Thank you,
Dimitris
Hello @henrietteklindt ,
We haven’t heard from you for several days now, so it looks like you don’t need our assistance anymore.
Feel free to re-open this ticket if needed.
Kind regards
Kasia