Created
August 6, 2013 23:02
-
-
Save johnchandler/6169632 to your computer and use it in GitHub Desktop.
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
// Determine SAT Cost Depending on School | |
add_filter('gform_pre_render_2', 'define_sat_cost'); | |
function define_sat_cost($form){ | |
//Get current form page | |
$current_page = GFFormDisplay::get_current_page($form["id"]); | |
//If the current form page is page 2 | |
if ($current_page == 2) { | |
$school = $_POST["input_6"]; | |
if ( $school == "Bayside High" ) : | |
$_POST["input_19_2"] = 499; | |
elseif ( $school == "San Dimas High" ) : | |
$_POST["input_19_2"] = 549; | |
else : | |
$_POST["input_19_2"] = 599; //default price | |
endif; | |
} | |
//Return the form | |
return $form; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment