GP Multi-page Navigation // Gravity Perks // Disable Navigation After Set Page
<?php
/**
* GP Multi-page Navigation // Gravity Perks // Disable Navigation After Set Page
*/
// update the "673" to your form ID
add_filter( 'gform_pre_render_673', function( $form ) {
$submission = rgar( GFFormDisplay::$submission, $form['id'] );
// if submission data is not set for this form, we'll assume we're on the first page
if( GFFormDisplay::get_current_page( $form['id'] ) >= 3 ) {
$form['pagination']['gp-multi-page-navigation_enable'] = false;
}
return $form;
} );