gpsa_ajax_form_loading_message

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Change the loading message for all forms
  5. Since

Description

Filter to modify the AJAX form loading message.

Usage

Filter applied globally to all forms

add_filter( 'gpsa_ajax_form_loading_message', 'my_custom_function' );

Filter applied to forms on a specific post

add_filter( 'gpsa_ajax_form_loading_message_{POST_ID}', 'my_custom_function' );

Parameters

$message string

The default loading message.

$form_id int

The Gravity Form ID

$post_id int

The post ID

$args array

Additional args with context for where the form is being loaded.

context 'document'
post WP_Post|null
context 'block'
block WP_Block|null
block_content string|null
context 'shortcode'
content string
atts array|string

Examples

Change the loading message for all forms

This example shows how to modify the loading message for all forms across the site.

add_filter( 'gpsa_ajax_form_loading_message', 'modify_loading_message', 10, 4 );
function modify_loading_message( $message, $form_id, $post_id, $args ) {
    return 'Your form is loading, sire 🙇‍♀️';
}

Since

  • 1.0.1 Hook added.