CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 14:51:37 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
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=zDtVyHFNfYpPqhFuzHB4Ny9wfABnHwjAS4Z5dYuQL6o7ReHL%2F88dU6c0gQUmhTpbt6pyduEAPaWfiZBLNG3eVIuwth2os6y7d2xfR1lckE%2BxM9lv"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 98cf2d313d6175e9-BLR
gform_form_pre_update_entry - Gravity Forms Documentation
gform_form_pre_update_entry
Description
Allows the form object to be modified before the entry is updated by an add-on or the API.
Usage
The following would apply to all forms:
add_filter( 'gform_form_pre_update_entry', 'your_function_name', 10, 3 );
To target a specific form, append the form id to the hook name. (format: gform_form_pre_update_entry_FORMID)
add_filter( 'gform_form_pre_update_entry_1', 'your_function_name', 10, 3 );
Parameters
- $form Form Object
The current form.
-
$entry Entry Object
The current entry.
-
$entry_id int
The ID of the current entry.
Example
The example below removes one of the form fields from the Form Object so that it is not updated with the entry data.
add_filter( 'gform_form_pre_update_entry', 'modify_form', 10, 3 ); function modify_form( $form, $entry, $entry_id ){ $fields = $form['fields']; foreach ( $fields as $field ){ if ( $field['label'] == 'Test') { continue; } $new_fields[] = $field; } $form['fields'] = $new_fields; return $form; }
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms version 1.9.9.
Source Code
This filter is located in GFAPI::update_entry() in includes/api.php and
GF_Forms_Model_Legacy::update_entry() in includes/legacy/forms_model_legacy.php.