spivurno
4/4/2016 - 9:50 PM

GP Multi-page Navigation // Gravity Perks // Disable Navigation on First Page Only

GP Multi-page Navigation // Gravity Perks // Disable Navigation on First Page Only

<?php
/**
 * GP Multi-page Navigation // Gravity Perks // Disable Navigation on First Page Only
 */

// 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'] ) == 1 && ( ! $submission || ! $submission['is_valid'] ) ) {
		$form['pagination']['gp-multi-page-navigation_enable'] = false;
	}

	return $form;
} );