spivurno
9/12/2012 - 5:51 PM

Gravity Wiz // Conditional Confirmations: Examples

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));