1.0 | 2021-07-07
1.0 | 2021-07-07
All new!
1.0 | 2021-07-07
1.0 | 2021-07-07
All new!
Akismet Site-wide SettingsAkismet Form-level SettingsWhat Happens if I Leave the Akismet Settings blank?
There are two places you can find settings related to the Akismet Add-On.
Site-wide settings are available within the Gravity Forms Settings page, where you should find an Akismet tab within the left hand list.
Form-level settings will be enabled once the site-wide setting is activated, and allow you to make individual form setting decisions for the Akismet Add-On.
Akismet Site-wide Settings
Enabled by default on installation, the Akismet Integration toggle enables or disables Gravity Forms Akismet Add-On across your entire website. If enabled you will be able to view Akismet settings on the individual forms.
Akismet Form-level Settings
Here you can turn off form level Akismet checks, and map your form fields to Akismet fields for passing into the Akismet service for analysis.
SettingDescriptionEnable spam checkThis controls whether Akismet is active for this specific form.First NameSpecify which form field you want to pass as the author first name when sending your form entry data to the Akismet service.Last NameSpecify which form field you want to pass as the author last name when sending your form entry data to the Akismet service.EmailSpecify which form field you want to pass as the email of the comment author.WebsiteSpecify which form field you want to pass as the email of the comment website.SubjectUse the merge tags selector to choose one or more fields to be concatenated and passed as the subject. Will default to the {form_title} merge tag. ContentUse the merge tags selector to choose one or more fields to be concatenated and passed as the content. You can add multiple merge tags for each field by separating them with a comma.
The drop-down field mappings will try to default to the first field of a matching type. The Subject defaults to {form_title} and the Content will attempt to default to the merge tag for a paragraph or post body field.
Embedded forms submitted by logged in users will send the user role to Akismet. Akismet does not mark submissions by administrators as spam.
Data submitted via a Form Preview will be processed by Akismet in test mode to prevent those submissions training the Akismet filters.
What Happens if I Leave the Akismet Settings blank?
When the settings aren』t configured default mappings will be attempted as follows:
The entry creator merge tag will be used to get the first and last name, email, and url of the currently logged in userIf a user is not logged in or they don』t have values saved in those user properties the values from name, email, and website type fields will be usedThe values of the following field types will be sent as the content: address, email, hidden, list, name, number, phone, post_content, post_excerpt, post_tags, post_title, text, textarea, websiteFields with a visibility of administrative will not be used
SummaryUsageNotes
Summary
Displays the results of all Quiz Fields that exist in the form.
Usage
{all_quiz_results}
Notes
Quiz and Survey related merge tags can only be used in confirmations and notifications.For more information, refer to our Quiz Add-On documentation.
Checking this option will enable data to be passed to the form and pre-populate this field dynamically. Data can be passed via Query Strings, Shortcode and/or Hooks. After checking this option, you will need to specify the name of the parameter you will be using to pass data to this field.
For more detailed information on how to dynamically populate a field and known limitations please see our documentation on dynamic population.
SummaryUsageProperties:id:return_typeNotesKnown Issues
Summary
Allows for files uploaded to the media library to be inserted into the post.
Usage
{apc_media:[id]:[return_type]}
Properties
:id
The File Upload field ID.
:return_type
Format uploaded files should be returned in: ids or urls.
Notes
By default, the merge tag inserts the IDs of the uploaded files. This can be changed to insert the URLs of the uploaded files by defining urls as the third parameter, e.g. {apc_media:12:urls}.
When using the merge tag with a multi-file upload field, file IDs or URLs will be output as a comma separated list.
Known Issues
Since the original Gravity Forms file upload path is not stored with the file in the media library, this merge tag is only available for use during the initial form submission process.
IntroductionFormsget_formget_formsdelete_formsdelete_formupdate_formsupdate_formupdate_forms_propertyupdate_form_propertyadd_formsadd_formsubmit_formEntriesget_entriescount_entriesentry_existsget_entryadd_entriesadd_entryupdate_entry_propertyupdate_entry_fieldupdate_entryupdate_entriesdelete_entryFeedsNotificationssend_notificationsFieldsget_fields_by_typeget_fieldNotes
Introduction
The Gravity Forms API Functions provides developers with a future-proof way to access some of the common core functionality in Gravity Forms.
The API Functions are automatically included when Gravity Forms loads and they will be available by the time add-ons load. The API class is called GFAPI and it can be found in /plugins/gravityforms/includes/api.php.
Forms
get_form
Returns the form object for a given Form ID.
1public static function get_form( $form_id ) {}
Parameters
$form_id integer
The ID of the form to be returned.
Returns
$form mixed
The Form Object array or false.
Usage Example
1$form = GFAPI::get_form( $form_id );
get_forms
Returns an array of form objects.
1public static function get_forms( $active = true, $trash = false, $sort_column = 'id', $sort_dir = 'ASC' ) {}
Parameters
$active boolean
Optional. Default is true. Determines if inactive forms should also be returned.
$trash boolean
Optional. Default is false. Determines if trashed forms should also be returned.
$sort_column string
Since version 2.5. Optional. Default is id. The column to sort the forms by. Accepted values: id, title, date_created, is_active, and is_trash.
$sort_dir string
Since version 2.5. Optional. Default is ASC. The direction to use when sorting. Accepted values: ASC or DESC.
Returns
$forms mixed
An array of Form Objects.
Usage Example
1$forms = GFAPI::get_forms();
delete_forms
Deletes the forms with the given Form IDs.
1public static function delete_forms( $form_ids ) {}
Parameters
$form_ids array
An array of form IDs to delete.
Returns
This function does not return anything.
Usage Example
1$result = GFAPI::delete_forms( $form_ids );
delete_form
Deletes the form with the given Form ID.
1public static function delete_form( $form_id ) {}
Parameters
$form_id integer
The ID of the Form to be deleted.
Returns
$result mixed
True for success or a WP_Error instance.
Usage Example
1$result = GFAPI::delete_form( $form_id );
update_forms
Updates the forms with an array of form objects.
1public static function update_forms( $forms ) {}
Parameters
$forms array
An array of Form Objects to be updated.
Returns
$result mixed
True for success or a WP_Error instance.
Usage Example
1$result = GFAPI::update_forms( $forms );
update_form
Updates the form with a given form object.
1public static function update_form( $form, $form_id = null ) {}
Parameters
$form Form Object
The modified form to be updated.
$form_id integer
Optional. If specified, then the ID in the Form object will be ignored.
Returns
$result mixed
True for success or a WP_Error instance.
Usage Example
1$result = GFAPI::update_form( $form );
update_forms_property
Updates a form property – a column in the main forms table. e.g. is_trash, is_active, title
1public static function update_forms_property( $form_ids, $property_key, $value ) {}
Parameters
$form_ids array
The IDs of the forms to update.
$property_key array
The names of the column in the database e.g. is_trash, is_active, title.
$value array
The new values.
Returns
$result mixed
The result of the query or a WP_Error instance.
Usage Example
1$result = GFAPI::update_forms_property( $form_ids, $property_key, $value );
update_form_property
Updates the property of one form – columns in the main forms table. e.g. is_trash, is_active, title
1public static function update_form_property( $form_id, $property_key, $value ) {}
Parameters
$form_ids integer
The ID of the form to update.
$property_key string
The name of the column in the database e.g. is_trash, is_active, title.
$value string
The new value.
Returns
$result mixed
The result of the query or a WP_Error instance.
Usage Example
1$result = GFAPI::update_form_property( $form_id, $property_key, $value );
add_forms
Adds multiple form objects.
1public static function add_forms( $forms ) {}
Parameters
$forms array
An array of Form Objects.
Returns
$result mixed
Either an array of new form IDs or a WP_Error instance.
Usage Example
1$result = GFAPI::add_forms( $forms );
add_form
Adds a new form using the given Form object. Warning, little checking is done to make sure it』s a valid Form object.
1public static function add_form( $form ) {}
Parameters
$form Form Object
The Form object.
Returns
$result Mixed
Either the new Form ID or a WP_Error instance.
Usage Example
1$result = GFAPI::add_form( $form );
submit_form
Submits a form. Use this function to send input values through the complete form submission process.
Supports field validation, notifications, confirmations, multiple-pages, save & continue and all the filters and actions that fire throughout the submission process. This includes the processing of any feeds configured for the form.
This is exactly equivalent to submitting a form rendered by a Gravity Forms shortcode. The input names expected by this function are identical to the input names found in the form markup so if you have any doubts about the name of an input, just check the form preview.
1public static function submit_form( $form_id, $input_values, $field_values, $target_page, $source_page ) {}
Parameters
$form_id integer
The ID of the form this submission belongs to.
$input_values array
An associative array containing the values to be saved.
$field_values array
Optional. An array of dynamic population parameter keys with their corresponding values used to populate the fields.
$target_page integer
Optional. Default is 0. Useful for multi-page forms to indicate which page is to be loaded if the current page passes validation.
$source_page integer
Optional. Default is 1. Useful for multi-page forms to indicate which page of the form was just submitted.
Returns
$result array
An array containing the result of the submission.
Example output for a successful submission:
1234'is_valid' => boolean true'page_number' => int 0'source_page_number' => int 1'confirmation_message' => string 'confirmation message [snip]'
Example output for failed validation:
123456'is_valid' => boolean false'validation_messages' => array 2 => string 'This field is required. Please enter the first and last name.''page_number' =>; int 1'source_page_number' => int 1'confirmation_message' => string ''
Example output for save and continue:
12345'is_valid' => boolean true'page_number' => int 1'source_page_number' => int 1'confirmation_message' => string 'Please use the following link to return to your form from any computer. [snip]''resume_token' => string '045f941cc4c04d479556bab1db6d3495'
Usage Example
1234567$input_values['input_1'] = 'Single line text';$input_values['input_2_3'] = 'First name';$input_values['input_2_6'] = 'Last name';$input_values['input_5'] = 'A paragraph of text.';$input_values['gform_save'] = true; // support for save and continue $result = GFAPI::submit_form( 52, $input_values );
Entries
get_entries
Returns an array of Entry objects for the given search criteria.
1public static function get_entries( $form_ids, $search_criteria = array(), $sorting = null, $paging = null, $total_count = null ) {}
Parameters
$form_ids integer|array
The ID of the form or an array IDs of the Forms. Zero for all forms.
$search_criteria array
Optional. An array containing the search criteria. The search criteria array is constructed as follows:
Filter by status
1$search_criteria['status'] = 'active';
Filter by any column in the main table
123$search_criteria['field_filters'][] = array( 'key' => 'currency', 'value' => 'USD' );$search_criteria['field_filters'][] = array( 'key' => 'is_read', 'value' => true );$search_criteria['field_filters'][] = array( 'key' => 'created_by', 'value' => $current_user->ID );
Filter by date range
12$search_criteria['start_date'] = $start_date;$search_criteria['end_date'] = $end_date;
Filter by Field Values
1$search_criteria['field_filters'][] = array( 'key' => '1', 'value' => 'gquiz159982170' );
Filter Operators
1234// Supported operators for scalar values: is/=, isnot, contains$search_criteria['field_filters'][] = array( 'key' => '1', 'operator' => 'contains', 'value' => 'Steve' );// Supported operators for array values: in/=, not in/!=$search_criteria['field_filters'][] = array( 'key' => '1', 'operator' => 'not in', 'value' => array( 'Alex', 'David', 'Dana' ) );
Filter by a checkbox value (not recommended)
1$search_criteria['field_filters'][] = array( 'key' => '2.2', 'value' => 'gquiz246fec995' );
Notes:
Using input IDs as search keys will work for checkboxes but it won』t work if the checkboxes have been re-ordered since the first submission.
the 『not in』 operator is not currently supported for checkbox values.
Filter by a checkbox value (recommended)
12$search_criteria['field_filters'][] = array( 'key' => '2', 'value' => 'gquiz246fec995' );$search_criteria['field_filters'][] = array( 'key' => '2', 'operator' => 'in', 'value' => array( 'First Choice', 'Third Choice' ) );
NOTE: Neither 『not in』 nor 」 operators are not currently supported for checkboxes using field IDs as search keys.
Filter by a global/free-form search of values of any form field
123$search_criteria['field_filters'][] = array( 'value' => $search_value );// OR$search_criteria['field_filters'][] = array( 'key' => 0, 'value' => $search_value );
Filter entries by Entry meta (added using the gform_entry_meta hook)
12$search_criteria['field_filters'][] = array( 'key' => 'gquiz_score', 'value' => '1' );$search_criteria['field_filters'][] = array( 'key' => 'gquiz_is_pass', 'value' => '1' );
Filter by ALL / ANY of the field filters
12$search_criteria['field_filters']['mode'] = 'all'; // default$search_criteria['field_filters']['mode'] = 'any';
$sorting array
Optional. An array containing the sorting criteria. Sorting: column, field or entry meta:
12// default$sorting = array( 'key' => $sort_field, 'direction' => 'ASC', 'is_numeric' => true );
$paging array
Optional. An array containing the paging criteria. Default is a page size of twenty.
IMPORTANT TIP: use paging to limit the number of entries otherwise you may find the database times out. On most servers we』ve found the optimum page size to be 200.
12// default$paging = array( 'offset' => 0, 'page_size' => 30 );
$total_count integer
Optional. An output parameter containing the total number of entries. Pass a non-null value to get the total count.
Returns
$result mixed
An array of Entry Objects or a WP_Error instance.
Example 1: simple
1$entries = GFAPI::get_entries( $form_id );
Example 2: two field filters
123456789101112131415$search_criteria = array( 'status' => 'active', 'field_filters' => array( 'mode' => 'any', array( 'key' => '1', 'value' => 'Second Choice' ), array( 'key' => '5', 'value' => 'My text' ) ));$entries = GFAPI::get_entries( $form_id, $search_criteria );
Example 3: sorting
123$search_criteria = array();$sorting = array( 'key' => '5', 'direction' => 'ASC' );$entries = GFAPI::get_entries( $form_id, $search_criteria, $sorting );
Example 4: paging
1234$search_criteria = array();$sorting = array();$paging = array( 'offset' => 0, 'page_size' => 25 );$entries = GFAPI::get_entries( $form_id, $search_criteria, $sorting, $paging );
Example 5: paging with total count
123456$search_criteria = array();$sorting = array();$paging = array( 'offset' => 0, 'page_size' => 25 );$total_count = 0;$entries = GFAPI::get_entries( $form_id, $search_criteria, $sorting, $paging, $total_count );// $total_count now contains the total number of entries matching the search criteria. This is useful for displaying pagination controls.
Example 6: entries in the last 30 days
12345678$search_criteria = array();$form_id = 4;$start_date = date( 'Y-m-d', strtotime('-30 days') );$end_date = date( 'Y-m-d', time() );$search_criteria['start_date'] = $start_date;$search_criteria['end_date'] = $end_date; GFAPI::get_entries($form_id, $search_criteria);
count_entries
Returns the total number of entries for the given search criteria.
1public static function count_entries( $form_ids, $search_criteria = array() ) {}
Parameters
$form_ids integer|array
The ID of the form or an array IDs of the Forms. Zero for all forms.
$search_criteria array
Optional. An array containing the search criteria. See get_entries() for examples of the search criteria.
Returns
$result integer
The total count.
Usage Example
1$result = GFAPI::count_entries( $form_ids, $search_criteria );
entry_exists
Checks if an entry exists for the supplied ID.
1public static function entry_exists( $entry_id ) {}
Parameters
$entry_id integer
The ID to be checked.
Returns
$result boolean
Whether or not an entry exists for the supplied ID.
Usage Example
1$result = GFAPI::entry_exists( 1 );
get_entry
Returns the entry object for a given entry ID.
1public static function get_entry( $entry_id ) {}
Parameters
$entry_id integer
The ID of the Entry.
Returns
$result mixed
The Entry Object or a WP_Error instance.
Usage Example
1$entry = GFAPI::get_entry( $entry_id );
add_entries
Adds multiple Entry objects.
1public static function add_entries( $entries, $form_id = null ) {}
Parameters
$entries array
An array of Entry Objects.
$form_id integer
Optional. If specified, the form_id in the Entry objects will be ignored.
Returns
$result mixed
An array of entry IDs or a WP_Error instance.
Usage Example
1$entry_ids = GFAPI::add_entries( $entries, $form_id );
add_entry
Adds a single Entry object. The usual hooks that are triggered while saving entries are not fired here.
Checks that the form id, field ids and entry meta exist and ignores legacy values (i.e. values for fields that no longer exist).
1public static function add_entry( $entry ) {}
Parameters
$entry Entry Object
An array containing the entry to be added.
Returns
$result mixed
The ID of the created entry or a WP_Error instance.
Usage Example
1$entry_id = GFAPI::add_entry( $entry );
update_entry_property
Updates a single property of an entry.
1public static function update_entry_property( $entry_id, $property, $value ) {}
Parameters
$entry_id integer
The ID of the Entry Object.
$property string
The property of the Entry object to be updated.
$value mixed
The value to which the property should be set.
Returns
$result boolean
Whether the entry property was updated successfully.
Usage Example
1$result = GFAPI::update_entry_property( $entry_id, $property, $value );
update_entry_field
Updates a single field of an entry.
1public static function update_entry_field( $entry_id, $input_id, $value ) {}
Parameters
$entry_id integer
The ID of the Entry Object.
$input_id string
The id of the input to be updated. For single input fields such as text, paragraph, website, drop down etc… this will be the same as the field ID.
For multi input fields such as name, address, checkboxes, etc… the input id will be in the format {FIELD_ID}.{INPUT NUMBER}. ( i.e. 『1.3』 ).
The $input_id can be obtained by inspecting the key for the specified field in the $entry object.
$value mixed
The value to which the field should be set.
Returns
$result boolean
Either True or false. Whether the entry field was updated successfully.
Usage Example
1$result = GFAPI::update_entry_field( $entry_id, $input_id, $value );
update_entry
Updates a single Entry object.
1public static function update_entry( $entry, $entry_id = null ) {}
Parameters
$entry Entry Object
An array containing the entry to be updated.
$entry_id integer
Optional. If specified, the ID in the Entry object will be ignored.
Returns
$result mixed
True for success or a WP_Error instance.
Usage Example
1$result = GFAPI::update_entry( $entry );
update_entries
Updates multiple Entry objects.
1public static function update_entries( $entries ) {}
Parameters
$entries array
An array of Entry Objects to be updated.
Returns
$result mixed
True for success or a WP_Error instance.
Usage Example
1$result = GFAPI::update_entries( $entries );
delete_entry
Deletes a single Entry.
1public static function delete_entry( $delete_entry ) {}
Parameters
$entry_id integer
The ID of the Entry to be deleted.
Returns
$result mixed
True for success or a WP_Error instance.
Usage Example
1$result = GFAPI::delete_entry( $delete_entry );
Feeds
See Managing Add-On Feeds With The GFAPI.
Notifications
send_notifications
Sends all active notifications for a form given an entry object and an event.
1public static function send_notifications( $form, $entry, $event = 'form_submission' ) {}
Parameters
$form Form Object
An array containing all the current form』s properties.
$entry Entry Object
An array containing the entry currently being processed.
$event string
Optional. Default is form_submission. The event for which notifications should be sent. Custom events can be listed in the event drop down on the edit notification page by using the gform_notification_events filter.
Returns
This function does not return anything.
Usage Example
1GFAPI::send_notifications( $form, $entry, 'user_registered' );
Fields
get_fields_by_type
Returns an array containing the form fields of the specified type or types.
1public static function get_fields_by_type( $form, $types, $use_input_type = false ) {}
Parameters
$form Form Object
An array containing all the current form』s properties.
$types string|array
Indicates the type or types of fields to be returned.
$use_input_type boolean
Optional. Default is false. If available should the fields inputType property be used instead of the type property.
Returns
$fields array
An array containing the Field Objects of the specified type or types. An empty array will be returned if no matching fields found.
Usage Example
1$fields = GFAPI::get_fields_by_type( $form, array( 'checkbox' ), true );
get_field
Returns the field object for the requested field or input ID from the supplied form or form ID.
1public static function get_field( $form_or_id, $field_id ) {}
Since
GFAPI::get_field() was added in Gravity Forms 2.3.
Parameters
$form_or_id Form Object|int
The Form Object or ID.
$field_id string|int
The field or input ID.
Returns
$field Field Object|boolean
The field object or false if the form or field are not found.
Usage Examples
12345678// Passing the form object with the field id.$field_one = GFAPI::get_field( $form, 1 ); // Passing the form id with the field id.$field_one = GFAPI::get_field( 2, 1 ); // Passing the form id with the input id.$field_one = GFAPI::get_field( 2, '1.3' );
Notes
See Managing Notes With The GFAPI.
IntroductionSettingsSource Code
Introduction
The following settings are available for use on a field』s Appearance tab. The gform_field_appearance_settings hook can also be used to add custom settings at the positions indicated below.
Settings can be enabled for a field which extends the GF_Field class by overriding the get_form_editor_field_settings() method.
Settings
Position: 0
placeholder_setting
The Placeholder setting allows you to define the value of the placeholder attribute for the field input.
Position: 20
placeholder_textarea_setting
The Placeholder setting allows you to define the value of the placeholder attribute for the field textarea.
Position: 50
input_placeholders_setting
The Placeholders setting allows you to define the values of the placeholder attributes for the field inputs.
Position: 100
label_placement_setting
This displays a Field Label Visibility setting (when enabled by the gform_enable_field_label_visibility_settings filter) allowing the field label to be hidden and a Description Placement setting allowing the field description location to be overridden.
Position: 150
sub_label_placement_setting
The Sub-Label Placement setting allows the sub label position to be overridden or hidden (when enabled by the gform_enable_field_label_visibility_settings filter).
Position: 200
error_message_setting
Includes a Custom Validation Message setting enabling the field validation message to be overridden. Note: this does not override the message returned when the field fails no duplicates validation.
Position: 250
css_class_setting
The Custom CSS Class setting allows custom css class names to be added to the field container (the li element which contains the field).
Position: 300
enable_enhanced_ui_setting
Includes a Enable enhanced user interface setting allowing the select element used by the Drop Down and Multi Select fields to be enhanced by the chosen.js script.
Position: 400
size_setting
The Field Size setting provides a drop down allowing the field size to be set to small, medium, or large.
Source Code
The above settings are located in GFFormDetail::forms_page() in form_detail.php.
SummarySSL RequirementPHP cURL ExtensionRequired FieldsFeed
Summary
To be able to use the Authorize.Net Add-On for Gravity Forms, there are a few additional requirements beyond those of a normal Add-On:
SSL certificate installed and configured
PHP cURL extension
Required form fields
A working Authorize.Net feed
SSL Requirement
Because of the secure nature of capturing credit card information, the Authorize.Net Add-On requires a SSL certificate to be installed and configured. You will also need to configure your WordPress site to work properly with SSL.
Contact your web host if you need assistance in purchasing and configuring an SSL certificate.
If you need assistance configuring your WordPress site to work, check out the WordPress.org plugin repository for options.
PHP cURL Extension
You will need this installed on your server to facilitate communication with Authorize.Net. Contact your web host for assistance.
Required Fields
The following fields are required to be within your form to properly process payments via Authorize.Net:
Name
Address
Email
Phone Number
Product
Credit Card
Note: When using Page fields to create a multi-page form the Credit Card field should be located on the last page of the form.
Feed
In addition to the required fields being present within your form, you will also need to have a feed for the Authorize.Net Add-On to properly send the form submission data to Authorize.Net. Without this, payment data is not sent to Authorize.Net and therefore the payment is not processed.
For more information, take a look at our article on creating a feed for the Authorize.Net Add-On.
2.11 | 2021-03-242.10 | 2021-02-102.9 | 2020-09-282.8 | 2020-04-152.7 | 2019-08-072.6 | 2019-06-162.5 | 2018-04-122.4 | 2018-01-292.3 | 2016-09-062.2.2 | 2016-08-302.2.1 | 2016-08-152.2 | 2016-04-082.12.01.6.11.61.51.41.3.31.3.21.3.11.31.2.11.21.1.11.11.01.0.beta21.0.beta1.11.0.beta11.0.alpha21.0.alpha1
2.11 | 2021-03-24
Fixed a fatal error when using Edit Entry with the GravityView plugin.
2.10 | 2021-02-10
Fixed an issue where duplicate entries can be created when the browser tab is resumed or reloaded when the confirmation message has been displayed.
2.9 | 2020-09-28
Added support for Gravity Forms 2.5.
Fixed an issue with Solution ID when other plugins also use the Authorize.net API.
2.8 | 2020-04-15
Added translations for Hebrew, Hindi, Japanese, and Turkish.
Add Solution ID to single transactions.
Fixed a PHP 7.4 notice on the settings page.
2.7 | 2019-08-07
Added security enhancements.
Removed temporary plugin page.
2.6 | 2019-06-16
Updated the SSL certificate for the Authorize.Net SDK.
Updated the text of the Automatic Retry setting.
2.5 | 2018-04-12
Added security enhancements.
Added GPL to plugin header.
Fixed a fatal error which could occur if the subscription object was not returned by the gform_authorizenet_subscription_pre_create or gform_authorizenet_before_start_subscription filters.
Updated Plugin URI and Author URI to use https.
2.4 | 2018-01-29
Added support for Gravity Forms 2.3.
Added "Automatic Retry is turned on in my Authorize.Net account" checkbox to Settings Page. This feature is required for ARB.
Added additional error messages.
Updated "Override Default Settings" so it can be translated.
Fixed an issue with logging a message when the error_message array in the response object was empty.
Fixed strings for translations.
Fixed a test description appearing on the add-on settings page with Gravity Forms 2.2+.
2.3 | 2016-09-06
Added logging statements.
Updated Authorize.Net API library.
Fixed an issue with check_status() not connecting to the correct Authorize.Net account when local api settings differed from main api settings.
Fixed an issue with cancel_subscription() not connecting to the correct Authorize.Net account when local api settings differed from main api settings.
Fixed an issue with the subscription start date not showing the correct date in the entry detail page when the subscription start date is set for a day different than the current day.
2.2.2 | 2016-08-30
Fixed an issue with the subscription object billToAddress property.
2.2.1 | 2016-08-15
Added support for the line item taxable status being set using the gform_submission_data_pre_process_payment filter, e.g. $line_item['taxable'] = 'N'.
2.2 | 2016-04-08
Added logging of response to subscription cancellation request.
Added support for sending notifications on payment/subscription events. Configured on the edit notification page using the 'Event' setting.
Added phone to the billing information fields available for mapping on the feed.
Added Spanish translation (es_ES).
Added logging of api key validation failure.
Updated the gform_authorizenet_transaction_pre_capture, gform_authorizenet_amount_pre_authorize, gform_authorizenet_transaction_pre_capture_setup_fee, and gform_authorizenet_subscription_pre_create filters to include the $entry as an available parameter.
Updated to only add notification events if the form has a relevant feed.
Updated minimum Gravity Forms version to 1.9.12.
Updated to use can_create_feed() to determine if feeds can be created/edited.
Fixed an issue creating the subscription if the form title being assigned to the order description contains special characters.
Fixed an issue with the timestamp for logging statements recorded after the subscription startDate is set.
Fixed PHP notice related to the parameters of the gform_authorizenet_post_capture hook.
Fixed PHP notice which could occur if an authorize and capture transaction failed.
Fixed an issue with check_status() not passing the $action['type'] for use with the related hooks in the framework.
Fixed an issue with a logging statement.
Fixed an issue with the display of the payment details panel on the entry detail page for entries processed by the pre-framework version.
Fixed php notices related to the gform_authorizenet_post_capture hook when running an auth only transaction.
Fixed an issue with the phone field.
Removed potentially sensitive data from logging statements.
2.1
Updated logging statements.
Fixed PHP notice when form returns with a validation error.
Fixed an issue with the upgrade routine which could prevent the add-on settings being migrated.
2.0
Migration to Add-On Framework.
Updated subscription so that extra "voided" transaction is not created.
1.6.1
Updated POT file.
1.6
Added custom validation for the credit card field on cardholder's name.
Added support for Pound Sterling and Euro.
Added hook to allow authorization amount to be changed.
Added ability to cancel product payment capture. This will allow customers that want only the CC authorization process to take place and not the actual payment capture.
Added form title as subscription's order description to be consistent with initial authorize only transaction.
Updated cron to hourly and removed process_renewals() function from init.
Updated credit card number so that spaces are removed prior to sending it to Authorize.Net.
Fixed issue where product names with tab, newlines, and/or return characters would break transaction in Authorize.Net.
Fixed issue where field labels with newlines may break the edit feed UI.
Fixed PHP warnings for some unsaved feed settings.
Fixed issue where setup fee could not have decimal values (i.e. 49.99).
Fixed issue with Manage WP integration.
1.5
Added POT file.
Fixed issue with setup() running too late in the process and creating an error when first installed.
Fixed notice.
Fixed issue with subscriptions failing to be cancelled. Subscription id was being recorded in DB with incorrect value (transaction id).
1.4
Added hook to allow the entry id to be saved as part of the Authorize.Net transaction, in the Invoice Number field.
add_filter("gform_authorizenet_save_entry_id", "__return_true");
Updated flow so that an authorization is done during validation and the capture operation is done during form submission.
Updated subscription so that trial are captured as part of the recurring profile and not as a separate AIM transaction.
Updated hooks and filters.
Fixed function authorizenet_commit_transaction to return entry object when no transaction response exists so entry is returned to gform_entry_post_save filter, otherwise lead is empty.
Fixed issue with subscriptions failing to be created when only one name is entered in the cardholder name field.
1.3.3
Fixed issue where the "Send Authorize.Net email receipt" setting was not correctly saved to database.
1.3.2
Updated AJAX URL to resolve conflict with sites running under SSL.
1.3.1
Updated transaction response variable so that it is public, making it available during notifications and confirmations.
1.3
Added support for Manage WP.
Fixed issue with cancel subscription button not showing up correctly.
Added support for setup fee.
Added support for changing API on a feed by feed basis.
Added some hooks and filters.
Fixed notice messages.
Fixed typo on settings page.
1.2.1
Fixed issue with invoice number exceeding max character limit.
1.2
Added support for negative product prices (i.e. discounts).
Added random invoice number to prevent duplicate subscription problem.
1.1.1
Fixed issue with failed transactions due to the length of product names and product descriptions.
1.1
Fixed issue with calculation fields not being included in payment info sent to Authorize.Net
Added payment_gateway meta information.
Added new conditional logic options (greater than, less than, contains starts with, ends with) and support for other conditional fields.
Fixed notices.
Fixed setting the payment gateway.
Updated logging to use the GF Logging plugin.
Fixed issue with ARB not sending appropriate address information.
1.0
Updated line item logic so that it truncates line item names to 31 characters and descriptions to 255 characters.
Updated verbiage and added tooltips to settings page.
1.0.beta2
Fixed issue with expiration date being sent with an invalid format.
Fixed issue where product & option fields hidden via conditional logic were being applied to order total.
Fixed issue where product options were not being added to line item product price.
1.0.beta1.1
Fixed issue with trial amount not accepting currency symbols.
1.0.beta1
Added logging functionality to Authorize.Net transactions.
Fixed issue with hidden product field.
Fixed issue with line items not being sent property to Authorize.Net.
Updated request to Authorize.Net so that validate peer is disabled (to help with failed connections).
Updated single product field so that it's quantity is defaulted to 1 when the quantity field is disabled.
1.0.alpha2
Fixed validation issue on multi-page forms.
Added support for multiple feeds to be configured using the same form and executed based on condition.
Fixed issue with validation when credit card field was hidden by conditional logic.
1.0.alpha1
Added ability to specify mode (Production or Test) on settings page.
IntroductionUsagePropertiesMeta PropertiesSubscription Transaction Meta PropertiesCustomer Fields Properties
Introduction
The Authorize.Net Config ($config) is an associative array; it is populated by the properties from the Feed Object. It is used to ensure hooks which were available in the pre-framework versions of the plugin remain backwards compatible, simply making the new Feed Object available to these hooks instead could break existing code.
123456$config = array( 'id' => 5, 'form_id' => 10, 'is_active' => true, 'meta' => array(),);
Usage
We recommend accessing the $config properties using the rgar() or rgars() functions, e.g.:
12$meta = rgar( $config, 'meta' );$conditional_logic_enabled = rgars( $config, 'meta/authorizenet_conditional_enabled' );
Properties
id integer
The feed ID.
form_id integer
The form ID this feed was created for.
is_active boolean
Is the feed active or inactive. Default is true.
meta array
Config meta is an associative array. See below for the available properties.
Meta Properties
type string
The type of transaction which should occur when the feed is processed. Possible values: product or subscription.
customer_fields array
An associative array containing the Customer Fields Properties.
enable_receipt boolean
Send Authorize.Net email receipt? Default is false.
api_settings_enabled boolean
Override the default API settings? Default is false.
api_mode string
Which mode should this feed use when overriding the default API settings. Possible values: production or test.
api_login string
The API login ID to use when overriding the default API settings.
api_key string
The API transaction key to use when overriding the default API settings.
authorizenet_conditional_enabled boolean
Is the feed condition (conditional logic) setting enabled. Default is false.
authorizenet_conditional_field_id integer
Target field Id. Field that will have it』s value compared with the authorizenet_conditional_value property to determine if this rule is a match.
authorizenet_conditional_operator string
Operator to be used when evaluating this rule. Possible values: is, isnot, >, <, contains, starts_with, or ends_with.
authorizenet_conditional_value string
The value to compare with field specified by authorizenet_conditional_field_id.
Subscription Transaction Meta Properties
The following properties are only applicable when the type is set to subscription.
recurring_amount_field string
What to use for the recurring amount. Possible values: form_total or a product field ID
billing_cycle_number integer
How often should the recurring payment occur. Minimum values: 7 days or 1 month. Maximum values: 365 days or 12 months.
billing_cycle_type string
What unit to use with the billing_cycle_number. Possible values: day or month.
recurring_times integer
How many times the recurring payment should be made. The default (0) is to bill the customer until the subscription is canceled.
setup_fee_enabled boolean
Should a setup fee be charged? Default is false.
setup_fee_amount_field string
The ID of the product field containing the amount the user should be charged for the setup fee.
trial_period_enabled boolean
Should the recurring charge occur immediately or after a trial period? Default false.
trial_period_number integer
The duration of the trial. Default value: 1.
trial_amount string
The amount the user should be charged during the trial if enter_amount is selected for the trial_product.
update_post_action string
Change the post status when a subscription is canceled? Possible values: draft or delete.
Customer Fields Properties
email string
The ID of the field containing the customer』s email.
address1 string
The ID of the field containing the first line of the customer』s address.
address2 string
The ID of the field containing the second line of the customer』s address.
city string
The ID of the field containing the city of the customer』s address.
state string
The ID of the field containing the state of the customer』s address.
zip string
The ID of the field containing the zip of the customer』s address.
country string
The ID of the field containing the country of the customer』s address.