Contact Form 7: Custom redirect based off user dropdown selection
-
I’m trying to add a custom redirect to my form and I’m having trouble getting it to work.
I have a form asking for donations and I want it to redirect to a different page for each selection.
I got it to redirect to one page just fine, but getting it to redirect to a page + variable, I can’t seem to figure out.
Here’s my form:
<p>Type of Membership: [select membership-type id:options include_blank "$25 Fledgling" "$50 Naturalist" "$100 Guardian" "$250 Rehabiliator" "$500 Conservationist" "$1,000 Lifetime Sponsor"]</p>
In the Additional Settings box I put this, which works:
on_sent_ok: "alert("options"); var choice = 2; location = 'https://www.libertywildlife.net/addtocart.sc?productId=57&quantity='+choice;"
My alert works fine, my URL redirect works fine and even adds the variable to the end as expected.
My question, how do I change the variable based off the user’s dropdown menu selection?
- The topic ‘Contact Form 7: Custom redirect based off user dropdown selection’ is closed to new replies.