gppt_script_args

  1. Description
  2. Usage
    1. Apply to All Forms
    2. Apply to Specific Form (by form ID)
  3. Parameters
    1. Full $args Properties
  4. Source Code
  5. Since

Description

Filter all of the properties that will be used to initialize the GP Page Transitions JS functionality.

Usage

Apply to All Forms

add_filter( 'gppt_script_args', 'your_function_name', 10, 3 );

Apply to Specific Form (by form ID)

// format: gppt_script_args_{formId}
add_filter( 'gppt_script_args_7', 'your_function_name', 10, 3 );

Parameters

  • $args array

    An array of properties that will be used to initialize the GP Page Transitions JS functionality. See $args section below for a full list of $args properties.

  • $form Form object

    The current form object.


Full $args Properties

  • formId int

    Current form ID.

  • enablePageTransitions bool

    Flag indicating whether page transitions are enabled.

  • enableAutoProgress bool

    Flag indicating whether auto-progression is enabled.

  • hideNextButton bool

    Flag indicating whether next button should be hidden.

  • hidePrevButton bool

    Flag indicating whether previous button should be hidden.

  • enableSoftValidation bool

    Flag indicating whether soft validation is enabled.

  • validationSelectors array [

    An array of validation selector objects which control which inputs are validated and how.

    • id int

      Field ID of the selector.

    • selectors array

      An array of selector strings (i.e. ‘#input_1_2’).

    • relation string

      Specifies how the validation should be applied. Should ‘all’ selectors have a value or does validation pass if ‘any’ selector has a value?

    • validationMessage string

      Message to be displayed if field fails validation.

    ]

  • validationClass string

    Class(es) to be applied to the field container when a field fails validation.

  • validationMessageContainer string

    Markup that will wrap the validation message. Must include “{0}” wherever the message should be included in the markup.

  • submission array [

    The result of the submission. Used to reset the state of the GPPageTransitions JS object after a submission.

    • hasError bool

      Flag indicating whether the submission has an error.

    • sourcePage int

      Page number from which the form was submitted.

    • errorPage int

      Page number on which the first field with an error resides.

    ]

  • pagination array [

    An array of properties specific to how the form’s pagination is configured.

    • type string

      The pagination type of the current form.

    • startAtZero bool

      Flag indicating whether or not the progress bar should start at zero and only show 100% on the confirmation page.

    • pageCount int

      The total number of pages on the current form.

    • progressIndicators array

      An array of the progress indicator markup (progress bar or steps) for each page of the form. This is only used if ‘gppt_is_custom_pagination’ filter is configured to return true.

    • pages array

      An array of page names specified for the current form.

    • isCustom bool

      Flag indicating whether or not the progress indicators are custom or standard.

    • labels array

      An array of labels used to recreate Gravity Forms’ standard page verbiage.

    ]

  • transitionSettings array

    An array of parameters specific to Swiper. See Swiper parameters for more information.

Source Code

This filter is located in GP_Page_Transitions::pre_render() in class-gp-page-transitions.php.

Since

This filter is available since GP Page Transitions 1.0.