gform_userregistration_feed_settings_fields

Description

This filter can be used to modify the setting fields that appear on the feed page.

Usage

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

Parameters

Examples

add_filter( 'gform_userregistration_feed_settings_fields', 'add_custom_user_registration_setting', 10, 2 );
function add_custom_user_registration_setting( $fields, $form ) {
// adding my custom setting to the Additional Settings section
$fields['additional_settings']['fields'][] = array(
'name'      => 'myCustomSetting',
'label'     => __( 'My Custom Setting', 'my-text-domain' ),
'type'      => 'checkbox',
'choices'   => array(
array(
'label'         => __( 'This is the checkbox label', 'my-text-domain' ),
'value'         => 1,
'name'          => 'myCustomSetting'
)
),
'tooltip' => sprintf( '<h6>%s</h6> %s', __( 'Tooltip Header', 'my-text-domain' ), __( 'This is the tooltip description', 'my-text-domain' ) ),
// this setting should only be visible for "create" feeds (and not "update" feeds)
'dependency'  => array(
'field'   => 'feedType',
'values'  => 'create'
)
);
return $fields;
}

Placement

Your code snippet should be placed in the functions.php file of your active theme.

Since

This filter was added in version 3.0.

Source Code

$fields = apply_filters( 'gform_userregistration_feed_settings_fields', $fields, $form );

This filter is located in GF_User_Registration::feed_settings_fields() in class-gf-user-registration.php.