Skip to content

Instantly share code, notes, and snippets.

@spivurno
Last active October 10, 2015 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spivurno/3708552 to your computer and use it in GitHub Desktop.
Save spivurno/3708552 to your computer and use it in GitHub Desktop.
Gravity Wiz // Conditional Confirmations: Examples
<?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