Description
The gform_edit_field_link filter allows for modification of a form field edit link. This will change the link for all fields.
Usage
add_filter( 'gform_edit_field_link', 'your_function_name' );
Parameters
| Variable | Type | Description |
|---|---|---|
| $edit_field_link | string | The Edit Field Link (in HTML) |
Examples
Swap label “Settings” → “Edit” to match team vocabulary.
The following example relabels the edit field action button from Settings to Edit.
add_filter( 'gform_edit_field_link', function( $link ) {
return str_replace( '>Settings<', '>Edit<', $link );
} );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This hook is located in includes/fields/class-gf-field.php.