Last active
October 10, 2015 15:07
-
-
Save spivurno/3708552 to your computer and use it in GitHub Desktop.
Gravity Wiz // Conditional Confirmations: Examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// example for form ID 7 where the confirmation will redirect the user to http://google.com if the value of field ID 3 is less than 10 | |
GWConditionalConfirmations::add_conditional_confirmation(7, 3, 'less_than', 10, array('redirect' => 'http://google.com')); | |
// example for form ID 5 where a text confirmation will be displayed if field ID 2 is equal to "Virginia" | |
GWConditionalConfirmations::add_conditional_confirmation(5, 2, 'is', 'Virginia', 'Confirmed! You are from Virginia!'); | |
// example for form ID 11 where the confirmation will redirect to the WordPress page ID 12 if the value of field ID 4 is greater than 500 | |
GWConditionalConfirmations::add_conditional_confirmation(11, 4, 'greater_than', 500, array('page' => 12)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment