The gform_user_registration_save_config filter is used to save custom settings/meta specified using the gform_user_registration_add_option_section
or gform_user_registration_add_option_group
action hooks in Gravity Forms.
Usage
To use the filter, add the following code snippet:
add_filter('gform_user_registration_save_config', 'your_function_name');
Parameters
- $config (array): The User Registration configuration array.
More information
See Gravity Forms Docs: gform_user_registration_save_config
Important: This hook was removed in version 3.0 with no replacement. New feed settings defined using gform_userregistration_feed_settings_fields
are saved automatically.
Examples
Save Multisite Config
This example demonstrates how to save the custom option fields added using the gform_user_registration_add_option_section
hook to support the multisite options.
add_filter('gform_user_registration_save_config', 'save_multisite_config'); public static function save_multisite_config($config) { $config['meta']['multisite_options']['create_site'] = RGForms::post("gf_user_registration_multisite_create_site"); $config['meta']['multisite_options']['site_address'] = RGForms::post("gf_user_registration_multisite_site_address"); $config['meta']['multisite_options']['site_title'] = RGForms::post("gf_user_registration_multisite_site_title"); return $config; }
Note: The source code for this action hook is located in userregistration.php.