Last active
August 29, 2015 14:22
-
-
Save spivurno/c4dadbb4dfd6ead00f5e to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Forms // Force Field with Default Value to Refresh on Save & Continue
This file contains 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
/** | |
* Gravity Wiz // Gravity Forms // Force Field with Default Value to Refresh on Save & Continue | |
*/ | |
add_action( 'gform_submission_values_pre_save', function( $values, $form ) { | |
// update "12" to the ID of your desired form | |
if( $form['id'] == 12 ) { | |
// update "4" to the field ID that should be refreshed on save & continue | |
$values[4] = false; | |
} | |
return $values; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment