Disable Same Form Passthrough Without a Token

This example will prevent GPEP from continuously passing through entries if the ep_token is not present in the URL and the source and target forms are the same.

Code

Filename: gpep-disable-same-form-passing-through-entries-without-a-token.php

<?php
/**
 * Gravity Perks // Easy Passthrough // Disable Same Form Passthrough Without a Token
 * https://gravitywiz.com/documentation/gravity-forms-easy-passthrough/
 *
 * This example will prevent GPEP from continuously passing through entries if the `ep_token` is
 * not present in the URL and the source and target forms are the same.
 */
add_filter('gpep_disable_same_form_passthrough', function( $disable ) {
	if ( ! rgget( 'ep_token' ) ) {
		$disable = true;
	}
	return $disable;
});

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.