| CARVIEW |
Select Language
HTTP/2 301
date: Mon, 29 Dec 2025 09:58:24 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_form_trash_link/
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=D%2Bu4kyKinYBPnAlg9VoM3XhGVTnhvpwQB%2Fm1F6gvOtQZWucO3%2BABE1PovNGjhaQZDTxE1bPhrpQKgRj4GCZ%2BG63k4nUgZla5noAfELJgLOP2RP6S"}]}
cf-ray: 9b58704c5de5a9c3-BLR
HTTP/2 200
date: Mon, 29 Dec 2025 09:58:25 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=SEGcumLdhkk8lB4KhOtu1FQq85Uffi50LcGrGQT7qCHXfywmPoH9g2jMtpdIbmcsThLYruFNRrRDFrD7kpnJHADXxxEiFumBsNu25EAoN%2Bp%2BmS%2Fr"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b5870531e81a9c3-BLR
gform_form_trash_link - Gravity Forms Documentation
gform_form_trash_link
Description
This filter is no longer available since Gravity Forms 2.5.
Allows for modification of the Form Trash Link on the Form Editor page.
Note: Replaced the deprecated gform_form_delete_link filter.
Usage
add_filter( 'gform_form_trash_link', 'your_function_name', 10, 2 );
Parameters
Examples
1. Change the text of the link
add_filter( 'gform_form_trash_link', 'rename_trash_link', 10, 2 );
function rename_trash_link( $trash_link, $form_id ){
$trash_link = str_replace( 'Move to Trash', 'Remove this Form', $trash_link );
return $trash_link;
}
2. Prevent a specific Form from being deleted
add_filter( 'gform_form_trash_link', 'prevent_form_deletion', 10, 2 );
function prevent_form_deletion( $trash_link, $form_id ){
if ( $form_id == 75 ) {
$trash_link = '<a class="submitdelete" onclick="alert(\'This form cannot be deleted.\');" onkeypress="alert(\'This form cannot be deleted.\')">Remove this Form</a>';
}
return $trash_link;
}
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.8.
Added the $form_id param in version 2.1.2.3.
Source Code
This filter is located in GFFormDetail::forms_page() in form_detail.php.