Using Gravity Forms ‘gform_activecampaign_note’ PHP filter

The gform_activecampaign_note filter allows you to modify the note that will be created and associated with a given contact in Gravity Forms.

Usage

To apply this filter to all forms, use the following code:

add_filter('gform_activecampaign_note', 'your_function_name', 10, 3);

To apply this filter to a specific form, use the following code:

add_filter('gform_activecampaign_note_FORMID', 'your_function_name', 10, 3);

Parameters

  • $note (array): Properties that will be used to create and assign the note.
  • $contact_id (int): Contact ID to associate the note with.
  • $list_id (int): List ID to associate the note with.
  • $note (string): Actual note content. HTML will be stripped.
  • $feed (array): Current Active Campaign feed being processed.
  • $entry (array): Current entry being processed.
  • $form (array): Current form being processed.

More information

See Gravity Forms Docs: gform_activecampaign_note

This filter was added in Gravity Forms Active Campaign 1.6. The source code for this filter is located in GFActiveCampaign::process_feed() in includes/class-gf-activecampaign.php.

Examples

Customize the note

This example demonstrates how to customize the note content.

add_filter('gform_activecampaign_note', function($note) {
    $note['note'] = 'My custom note.';
    return $note;
});