Disable Passing Through Entries Without a Token

Instructions

See “Where do I put snippets?” in our documentation for installation instructions.

Code

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

1
2
3
4
5
6
7
8
9
10
11
<?php
/**
 * Gravity Perks // Easy Passthrough // Disable Passing Through Entries Without a Token
 * https://gravitywiz.com/documentation/gravity-forms-easy-passthrough/
 */
add_filter( 'gpep_bypass_session_init', function() {
	if ( ! rgget( 'ep_token' ) || ! gp_easy_passthrough()->get_entry_for_token( rgget( 'ep_token' ) ) ) {
		$session = gp_easy_passthrough()->session_manager();
		$session->reset();
	}
} );

Comments

  1. Clifford Paulick
    Clifford Paulick April 5, 2026 at 2:38 am

    not following the logic on this one… if parent Form #1 feeds values into Form #2 via Easy Passthrough, how can I ensure this rule only applies to Form #2 (and avoids other Forms that this snippet should NOT apply to)?

    Reply
    1. Glenn Tangalin
      Glenn Tangalin Staff April 6, 2026 at 12:28 am

      Hey Clifford!

      This snippet does need a bit of tweaking for that use case. I’ll follow up with you via support email so we can take a closer look at your setup 👍

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.