| CARVIEW |
Select Language
HTTP/2 301
date: Sat, 27 Dec 2025 04:16:57 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_form_settings_initial_values/
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: MISS
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=sEoJYoccgyf9myGa3bwKkZwbvOCR28w10PhQJuNlKM3FBtDHq%2FQv0j7%2BTb2F1IeVHHNysHUbq2%2F2ztNZZZKd2a9SoPv%2BUCD0SV6akOTxLvzht%2BWK"}]}
cf-ray: 9b46015f79e7af3d-BLR
HTTP/2 200
date: Sat, 27 Dec 2025 04:16:58 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: EXPIRED
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=28VIKH1XmD5mWJpjSBPxDeKDj9wTIc%2FSHnoDo8BLPcGhVotTG0HXIj6NFnQdbrvbn%2FjC%2BUOz7YoUiEVEPRD2kwPSryQTXGXNFbJktCSHcLu9%2Fpie"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b460165cc95af3d-BLR
gform_form_settings_initial_values - Gravity Forms Documentation
gform_form_settings_initial_values
Description
The filter gform_form_settings_initial_values allows the initial values that will be populated into the form settings to be overridden.
Usage
The filter which would run for all forms would be used like so:
add_filter( 'gform_form_settings_initial_values', 'your_function_name', 10, 2 );
Parameters
- $initial_values array
An associative array of setting names and their initial values. - $form Form Object
The form currently being edited.
Examples
1. Enable Honeypot
add_filter( 'gform_form_settings_initial_values', function( $initial_values, $form ) {
$initial_values['enableHoneypot'] = true;
return $initial_values;
}, 10, 2 );
Placement
This code should be placed in the functions.php file of your active theme or a custom functions plugin.
Since
This filter was added in Gravity Forms v2.5.
Source Code
This filter is located in GFFormSettings::get_initial_values() in form_settings.php.