gform_addon_form_settings_fields

Description

Allows code to modify the settings fields displayed on a given form settings page.

Usage

Generic: applies to all add-ons and all forms.

add_filter( 'gform_addon_form_settings_fields', 'your_function_name', 10, 2 );

Add-on-specific: applies to a specific add-on for all forms. Requires a minimum PHP version of 5.3.

add_filter( 'gform_{ADDON_SLUG}_form_settings_fields', 'your_function_name', 10, 2 );

See the Gravity Forms Add-On Slugs article for a list of possible slugs.

Parameters

  • $sections array
    The current sections and fields.
  • $form string
    The current form.

Examples

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Source Code

$sections = gf_apply_filters( array( 'gform_addon_form_settings_fields', rgar( $form, 'id' ), $this->_slug ), $sections, $form );

This filter is located in GFAddOn::form_settings_init() in includes/addon/class-gf-addon.php.

Since

This filter was added in Gravity Forms 2.7.