@danielpettifer, regarding this code:
http://www.gravityhelp.com/forums/topic/add-conditional-logic-to-submit-button#post-1591
That is a discrete PHP file stored on your server. Call it whatever you want (redirection.php is OK) and put it in your theme folder. Then use that file as part of the redirect URL. So the url will look like
http://example.com/wp-content/themes/themename/redirection.php
Now, that file has the logic to "catch" the value of "purchase" you are sending.
What I would do is send one parameter name (in this case 'purchase') and send different values. Then the code (the "case" statements) will be extended to handle all your options (6 you say.) So, maybe you will have a parameter name of "course" and send it in the query string like this:
?course=algebra
?course=spelling
?course=cooking
?course=bicycling
?course=kayaking
?course=sleeping
If that were the case, you will use change "purchase" to "course" and instead of 2 cases in the switch statement, you will have 6, and each one is exactly as listed above.
Please let us know if you need more help. This is a very old topic and our advice has changed and gotten better since this was written. I can't find the newer topic though.
Posted 12 years ago on Monday January 30, 2012 |
Permalink