Using Gravity Forms ‘gform_form_settings_page_gravityformszapier’ PHP action

The gform_form_settings_page_gravityformszapier action in Gravity Forms PHP is a hook that is dynamically generated and used for the Gravity Forms Zapier Add-On.

It is a variation of the gform_form_settings_page_{VIEW} hook in Gravity Forms.

Usage

add_action('gform_form_settings_page_gravityformszapier', 'your_custom_function');
function your_custom_function() {
    // your custom code here
    return;
}

Parameters

  • None

More information

See Gravity Forms Docs: gform_form_settings_page_gravityformszapier For more details on using this hook, refer to gform_form_settings_page_{VIEW}.

Examples

Change settings page title

Change the title of the Gravity Forms Zapier settings page.

add_action('gform_form_settings_page_gravityformszapier', 'change_settings_page_title');
function change_settings_page_title() {
    echo '<h1>Custom Zapier Settings</h1>';
}

Add custom content to settings page

Add custom content to the Gravity Forms Zapier settings page.

add_action('gform_form_settings_page_gravityformszapier', 'add_custom_content');
function add_custom_content() {
    echo '<p>Some custom content goes here.</p>';
}

Add custom CSS to settings page

Add custom CSS to the Gravity Forms Zapier settings page.

add_action('gform_form_settings_page_gravityformszapier', 'add_custom_css');
function add_custom_css() {
    echo '<style>
    h1 {color: red;}
    p {font-size: 18px;}
    </style>';
}

Display a custom message on settings page

Display a custom message on the Gravity Forms Zapier settings page based on a condition.

add_action('gform_form_settings_page_gravityformszapier', 'display_custom_message');
function display_custom_message() {
    if (current_user_can('administrator')) {
        echo '<p>Welcome, admin! Here are your Zapier settings.</p>';
    } else {
        echo '<p>Sorry, you do not have permission to view this page.</p>';
    }
}

Add custom JavaScript to settings page

Add custom JavaScript to the Gravity Forms Zapier settings page.

add_action('gform_form_settings_page_gravityformszapier', 'add_custom_js');
function add_custom_js() {
    echo '<script>
    document.addEventListener("DOMContentLoaded", function() {
        alert("Welcome to the Zapier settings page!");
    });
    </script>';
}