The gform_userregistration_feed_settings_fields filter allows you to modify the setting fields that appear on the User Registration Feed page in Gravity Forms.
Usage
add_filter('gform_userregistration_feed_settings_fields', 'your_function_name', 10, 2);
Parameters
$fields(array): An array of fields, with thenameproperty corresponding to the property that appears in the User Registration Feed Meta. See the Settings API for more details.$form(Form Object): The form currently being processed.
More information
See Gravity Forms Docs: gform_userregistration_feed_settings_fields
This filter was added in version 3.0.
Source code is located in GF_User_Registration::feed_settings_fields() in class-gf-user-registration.php.
Examples
Add a custom setting to the Additional Settings section
add_filter('gform_userregistration_feed_settings_fields', 'add_custom_user_registration_setting', 10, 2);
function add_custom_user_registration_setting($fields, $form) {
// Add 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;
}