Using Gravity Forms ‘gform_aweber_post_subscriber_created’ PHP action

The gform_aweber_post_subscriber_created Gravity Forms PHP action allows you to perform custom actions after a subscriber has been successfully added to an AWeber list in Gravity Forms.

Usage

To use this action, you can add the following code to your functions.php file:

add_action('gform_aweber_post_subscriber_created', 'your_function_name', 10, 4);

Parameters

  • $subscriber (array): An associative array containing the subscriber properties returned by AWeber in the response to the create request.
  • $form (Form Object): The Form which is currently being processed.
  • $entry (Entry Object): The Entry which is currently being processed.
  • $feed (Feed Object): The Feed which is currently being processed.

More information

See Gravity Forms Docs: gform_aweber_post_subscriber_created

Examples

Store a property in the entry meta

This example demonstrates how to store a value from one of the subscriber properties in the entry meta.

add_action('gform_aweber_post_subscriber_created', function ($subscriber, $form, $entry, $feed) {
    gform_update_meta($entry['id'], 'aweber_subscriber_status', rgar($subscriber, 'status'));
}, 10, 4);

Place this code snippet in the functions.php file of your active theme. This hook was added in AWeber version 2.4.1. The filter is located in GFAWeber::export_feed() in class-gf-aweber.php.