DescriptionUsageParametersExamplesAdd custom action linkRemove Duplicate action linkSource Code
Description
Use this filter to add custom form actions which display below the form title in the Form List view.
Usage
add_filter( 'gform_form_actions', 'form_actions', 10, 2 );
Parameters
$actions array
An associative array containing all of the default form actions (ie Edit, Preview, Notifications, etc.).
array(
'edit' => 'Edit',
'preview' => 'Preview',
'entries' => 'Entries',
'notifications' => 'Notifications',
'duplicate' => 'Duplicate',
'delete' => 'Delete'
);
$form_id integer
The ID of the field from which the entry value was submitted.
Examples
Add custom action link
This example demonstrates how to add an custom form action.
add_action( 'gform_form_actions', 'add_mergedoc_link', 10, 4 );
function add_mergedoc_link( $actions, $form_id ) {
$actions['mergedoc_settings'] = "" . __( 'MergeDoc', 'gravityformsmergedoc' ) . "";
return $actions;
}
Remove Duplicate action link
This example demonstrates how to remove the default Duplicate action link.
add_action( 'gform_form_actions', 'remove_duplicate_link', 10, 4 );
function remove_duplicate_link( $actions, $form_id ) {
// Remove Duplicate action link
unset ( $actions['duplicate'] );
return $actions;
}
Source Code
This filter is located in GFFormList::form_list_page() in form_list.php