gpasc_should_auto_save

  1. Description
  2. Usage
  3. Parameters
  4. Since
  5. Examples
    1. Only auto-save for logged-in users

Description

Filter whether the form should auto-save.

Usage

Filter whether all forms should auto-save.

add_filter( 'gpasc_should_auto_save', '__return_false' );

Filter whether a specific form should auto-save.

add_filter( 'gpasc_should_auto_save_FORMID', '__return_false' );

Parameters

  • should_auto_save bool

    Whether the form should auto-save. Defaults to the value of the “Enable Auto Save and Load” setting.

  • form array

    The current form.

Since

This filter is available since Gravity Forms Advanced Save & Continue 1.0-beta-1.

Examples

Only auto-save for logged-in users

By default, auto-saving will happen for both logged-in users and visitors who are not logged in.

add_filter( 'gpasc_should_auto_save', function() {
    return is_user_logged_in();
} );