Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

Developer DocumentationFormidable HooksDisplay Data
frm_guest_entries_cookie_expiration

frm_guest_entries_cookie_expiration

Heads up! This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or third-party development.

Use the frm_guest_entries_cookie_expiration filter to change how long a logged-out visitor can see the entries they submitted.

Since Formidable Forms Pro 7.0.1, a logged-out visitor who submits a form sees values from that entry with the [frm-field-value] shortcode. For example, a second form can fill in their answers with entry=pass_entry. Other visitors still see nothing.

A signed cookie in the visitor's browser remembers the entry for 1 hour after they submit it. Use this filter to make that time longer or shorter.

Learn more about who sees a value from an entry in Get a Value from an Entry.

Requirements

  • Formidable Forms Pro 7.0.1 or later.

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Usage

add_filter( 'frm_guest_entries_cookie_expiration', 'my_function_name' );

Parameters

  • $expiration (int): The number of seconds a logged-out visitor can see an entry after they submit it. Default HOUR_IN_SECONDS (1 hour). Return 0 or less to stop guests from seeing their entries.

Examples

Learn where to put the code when adding a custom PHP function to your site.

Show guests their entries for 2 hours

This example gives visitors more time, which helps with a long multi-step process across several forms.

add_filter( 'frm_guest_entries_cookie_expiration', 'my_guest_entries_expiration' );
function my_guest_entries_expiration( $expiration ) {
	return 2 * HOUR_IN_SECONDS; // Show guests their entries for 2 hours.
}

Show guests their entries for 15 minutes

This example shortens the time, which suits a shared computer in an office or a library.

add_filter( 'frm_guest_entries_cookie_expiration', 'my_guest_entries_expiration' );
function my_guest_entries_expiration( $expiration ) {
	return 15 * MINUTE_IN_SECONDS; // Show guests their entries for 15 minutes.
}

Limitations

  • Each entry keeps its own time, counted from when it was submitted. A later submission doesn't make an earlier entry last longer. A new time from this filter applies to entries submitted after you change it.
  • The browser remembers up to 10 entries. When a visitor submits more, the oldest entries are dropped.
  • No cookie is saved when Disable user tracking cookies is checked in the GDPR settings, or when the frm_create_cookies filter returns false. Guests then can't see their entries, whatever this filter returns.
  • Guest access works only in the browser that submitted the entry, while the visitor is logged out. Logged-in users see their own entries through their account. A visitor who logs in after submitting doesn't see an entry they submitted as a guest.
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Don't forget your purchase!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms