DescriptionUsageParametersExamplesPlacementSinceSource Code
Description
This filter allows the Capsule CRM Task object to be modified before it is created.
Usage
The following would apply to all forms:
1add_filter( 'gform_capsulecrm_task', 'your_function_name', 10, 4 );
To target a specific form, append the form id to the hook name. (format: gform_capsulecrm_task_FORMID)
1add_filter( 'gform_capsulecrm_task_1', 'your_function_name', 10, 4 );
To target a specific feed for a form, append the form id and feed id to the hook name. (format: gform_capsulecrm_task_FORMID_FEEDID)
1add_filter( 'gform_capsulecrm_task_1_7', 'your_function_name', 10, 4 );
Parameters
$task array
Capsule CRM task.
12345678910111213141516array ( 'description' => 'Capsule CRM', 'detail' => 'Task Created by API', 'lastName' => 'TestLast', 'dueOn' => '2019-02-14', 'dueTime => '21:25:08', 'status' => 'OPEN', 'category' => array( 'name' => 'Follow-up' ), 'owner' => array( 'username' => 'testuser' ))
$form Form Object
The current form.
$entry Entry Object
The current entry.
$feed Feed Object
The current feed.
Examples
12345add_filter( 'gform_capsulecrm_task', 'change_task_object', 10, 4 );function change_task_object( $task, $form, $entry, $feed ){ $task['description'] = 'Task Created by API'; return $task;}
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms Capsule CRM Add-On version 1.2.
Source Code
This filter is located in GFCapsuleCRM::create_task() in class-gf-capsulecrm.php.