Created
February 24, 2019 22:16
-
-
Save spivurno/cbab50fa50565e0a3067367fa879119a 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
<?php | |
/** | |
* Gravity Perks // Conditional Pricing + GravityView // Fix Page Number Validation Conflict | |
* http://gravitywiz.com/documentation/gravity-forms-conditional-pricing/ | |
*/ | |
add_filter( 'gform_pre_validation', function( $form ) { | |
if( is_callable( 'gravityview' ) && gravityview()->request->is_edit_entry() !== false ) { | |
foreach( $form['fields'] as &$field ) { | |
$field->pageNumber = 1; | |
} | |
} | |
return $form; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment