Skip to content

Instantly share code, notes, and snippets.

Last active Oct 10, 2015
What would you like to do?
Gravity Wiz // Conditional Confirmations: Examples
// example for form ID 7 where the confirmation will redirect the user to if the value of field ID 3 is less than 10
GWConditionalConfirmations::add_conditional_confirmation(7, 3, 'less_than', 10, array('redirect' => ''));
// 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