| CARVIEW |
Select Language
HTTP/2 301
date: Sat, 27 Dec 2025 06:13:25 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_pre_form_settings_save/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: HIT
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=8Xp6ALBO3PMhuOv3VBrLaoHVZlY%2BoWwFs%2BXgIo6j2WzI5Va5QIusBGZugga%2Fr2VyE%2FAydlHxXVfpxHiPAj5DrKtqurP%2Bwa3n9IjyPl1t338jxFm8"}]}
cf-ray: 9b46abfe79351ec2-BLR
HTTP/2 200
date: Sat, 27 Dec 2025 06:13:26 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=8ulnciiMWLDI7frlj27Umnav5OdwVL%2BG2rhnzTyjjPBAfOW8nKiNIpPxAt0UQ0%2BUDCam5MteLQpvmRsPnjXXyOTLJSg6ePSQoDa0VSGucPoo%2FY%2B9"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b46ac050e081ec2-BLR
gform_pre_form_settings_save - Gravity Forms Documentation
gform_pre_form_settings_save
Description
Modify the form object before saving on the Form Settings page. Useful for saving custom settings added via the gform_form_settings filter.
Usage
add_filter( 'gform_pre_form_settings_save', 'your_function_name' );
Parameters
- $form Form Object
The current form object being edited.
Examples
This example demonstrates how you can save custom settings added via the gform_form_settings filter to the form object using the gform_pre_form_settings_save filter.
// add a custom form setting
add_filter( 'gform_form_settings', 'my_custom_form_setting', 10, 2 );
function my_custom_form_setting( $settings, $form ) {
$settings['Form Basics']['my_custom_setting'] = '
<tr>
<th><label for="my_custom_setting">My Custom Label</label></th>
<td><input value="' . rgar( $form, 'my_custom_setting' ) . '" name="my_custom_setting"></td>
</tr>
';
return $settings;
}
// save your custom form setting
add_filter( 'gform_pre_form_settings_save', 'save_my_custom_form_setting' );
function save_my_custom_form_setting( $form ) {
$form['my_custom_setting'] = rgpost( 'my_custom_setting' );
return $form;
}
Source Code
This filter is located in GFFormSettings::form_settings_ui() in form_settings.php