Allow Field to be Populated Dynamically

Allow Field to be Populated Dynamically

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.

Akismet Settings Reference

Akismet Settings Reference

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

Akismet Anti-Spam

Akismet Anti-Spam

Updates to the Akismet IntegrationMore Information

Updates to the Akismet Integration

Gravity Forms has included built-in support for the Akismet Anti-Spam plugin since version 1.6.

As of July 2021, the Akismet functionality is now provided within the official Gravity Forms Akismet Add-On.

When enabled all form submissions will be checked by Akismet. Submissions identified as spam by Akismet will have their entry status property set to spam preventing processing of notifications and add-ons.

More Information

Refer to the Akismet Add-On user guides for articles about setting up and using the Akismet Add-On.

Agile CRM Feed Meta

Agile CRM Feed Meta

IntroductionUsagePropertiesCustom Field Properties

Introduction
The Feed Object meta for the Agile CRM add-on is an associative array containing the properties which determine how the add-on should process the form submission.
$feed['meta'] = array(
'feedName' => 'Agile CRM Feed 1',
'createContact' => true,
'contactCustomFields' => array(),
'feed_condition_conditional_logic' => true,
'feed_condition_conditional_logic_object' => array(
'conditionalLogic' => array(),
),
);

Usage
We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:
$conditional_logic_enabled = rgars( $feed, 'meta/feed_condition_conditional_logic' );

Properties

feedName string
The feed name which appears on the add-ons feeds tab.

createContact boolean
Create new contact. Default is false.

createTask boolean
Create new task. Default is false.

contactStandardFields_first_name string
The ID of the form field containing the contact』s first name.

contactStandardFields_last_name string
The ID of the form field containing the contact』s last name.

contactStandardFields_email_address string
The ID of the form field containing the contact』s email.

contactCustomFields array
A multidimensional array containing the Agile CRM custom fields. See Custom Field Properties.

contactTags string
A comma separated list of tags to be assigned to the contact. Merge tags supported.

updateContactEnable boolean
Should an existing contact be updated if found? Default is false.

updateContactAction string
The update action. Should the contact details be replaced or appended. Possible values: replace or append.

taskSubject string
The task subject line. Merge tags supported.

taskDaysUntilDue integer
The number of days until the task is due.

taskPriority string
The task priority. Possible values: HIGH, NORMAL or LOW.

taskStatus string
The task status. Possible values: YET_TO_START, IN_PROGRESS or COMPLETED.

taskType string
The task type. Possible values: CALL, EMAIL, FOLLOW_UP, MEETING, MILESTONE, SEND, TWEET or OTHER.

taskCreateNote boolean
Should a note be created for the task? Default is false.

taskNoteSubject string
The task note subject. Merge tags supported.

taskNoteDescription string
The task note description. Merge tags supported.

taskAssignToContact boolean
Should the task be assigned to the created contact? Default is false.

feed_condition_conditional_logic boolean
Is the feed condition (conditional logic) setting enabled. Default is false.

feed_condition_conditional_logic_object array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

Custom Field Properties
array(
'key' => 'title',
'value' => '3',
)

Each custom field is an associative array containing the following properties:

key string
The Agile CRM custom field key. Possible values: title, company, email_work, email_personal, phone_work, phone_home, phone_mobile, phone_home_fax, phone_work_fax, phone_other, address_home, address_postal, address_office, website_url, website_skype, website_twitter, website_linkedin, website_facebook, website_xing, website_feed, website_google_plus, website_flickr, website_github, website_youtube or gf_custom.

value string
The ID of the form field or entry meta item containing the value for this custom field.

custom_key string
The custom key. Only used when the custom field key is set to gf_custom.

Agile CRM Change Log

Agile CRM Change Log

1.4 | 2020-09-161.3 | 2020-03-261.2 | 2018-04-091.1 | 2016-01-271.0 | 2015-07-28

1.4 | 2020-09-16

Added support for Gravity Forms 2.5.
Fixed a fatal error which occurs during form submission if the field mapped to the contact email address is empty.
Fixed contact tags property including empty and duplicate items.

1.3 | 2020-03-26

Added translations for Hebrew, Hindi, Japanese, and Turkish.
Added tooltip to the Tags setting on the feed configuration page.
Added support for feed duplication.
Updated stylesheets to use minified versions.
Updated feed processing error logging statement and entry note to use the API returned error message when a 400 error occurs.
Fixed PHP 7.4 notices which occur when the API is initializing and the settings are empty.
Fixed the width of the Feed Name setting on the feed configuration page.

1.2 | 2018-04-09

Added security enhancements.
Added GPL to plugin header.
Updated Plugin URI and Author URI to use https.
Updated analytics tracking code.
Fixed strings for translations.

1.1 | 2016-01-27

Added feed duplication support. Requires Gravity Forms 1.9.14.26 or greater.
Added support for delaying feed processing until payment by PayPal Standard is successfully completed.
Updated action feed settings field with icons.
Updated Agile CRM API library to use WordPress API functions.
Updated available field types for mapping to the contact first name, last name, and email.
Fixed an issue with the settings page incorrectly indicating the api credentials are valid when the response was a 500 error.
Fixed an issue with the request failed message if a WP_Error occurs.
Fixed an issue with how the full address field value is formatted when sent to Agile.
Fixed a fatal error when the AgileCRM class has already been included by another plugin.
Fixed an issue with the contact tags being overwritten when the feed is configured to update and append.

1.0 | 2015-07-28

It's all new!

Advanced Post Creation vs Post Fields

Advanced Post Creation vs Post Fields

SummaryReference MaterialPost FieldsAdvantagesAdvanced Post CreationAdvantages

Summary

Each of these methods allow you to set up a form that upon submission automatically creates a new post with the data from the form.

The official Gravity Forms Advanced Post Creation Add-On (summarized here as 「APC」) has some useful features that are not included in the standard Post Fields, and they do function differently. APC is created in the form settings while post fields are dragged and dropped directly on the form.

Reference Material

Post fields documentation.Advanced Post Creation Add-On documentation.

Post Fields

Post Fields are added to the form directly, and provide input fields for each of the major components of a post. In this way, you control the content of your post directly from the form fields themselves.

When the user submits a form that contains any post fields a standard post will be created with content from the post fields that were included.

Advantages

Simple to setup.Quickest method to create a simplistic standard post. Easy to manage for anyone who understands the form editor.

Advanced Post Creation

The Advanced Post Creation Add-On can utilize any fields on your form that match the required type, and the creation of the post is managed by the feed you set-up from within the Form Settings → Post Creation.

Note that forms to be used to initiate Advanced Post Creation feeds cannot use the standard Post fields.

Refer to this help guide for details on how to create an APC feed.

Advantages

Can be used with an existing form, and does not require (and cannot use) Post fields. Has the ability to create standard and custom posts. For example: Product, Event, Team Member postings.Offers additional post settings.Allows more control over the post content, using merge tags and static text. Allows you to utilize conditional logic, to have branching feed choices based on form data submitted.

Advanced Post Creation Change Log

Advanced Post Creation Change Log

1.11.0 | 2021-07-211.0-beta-7.51.0-beta-7.41.0-beta-7.31.0-beta-7.21.0-beta-7.11.0-beta-7 | 2020-09-281.0-beta-6 | 2020-09-241.0-beta-5 | 2020-08-051.0-beta-4 | 2020-05-071.0-beta-3 | 2019-08-071.0-beta-2 | 2019-03-201.0-beta-1 | 2019-01-10

1.1

Fix a fatal error that occurs when a form is submitted with the date mapped to "Date & Time Fields" or "Custom Date & Time".

1.0 | 2021-07-21

Official release.

1.0-beta-7.5

Fixed UI issues in the feed settings page where the post date setting don't show options for the value selected.
API: Added gf_advancedpostcreation()->update_post( $post_id, $feed, $entry, $form ) to enable programmatic updating of posts.

1.0-beta-7.4

Fixed a compatibility issue with Gravity Forms 2.5 by updating the postExcerpt field to explicitly allow HTML.
Fixed an issue that causes custom dates and times entered into the feed settings to use UTC instead of the local time.

1.0-beta-7.3

Updated the post content field in the feed settings to use the text editor to enable easier markup entry.

1.0-beta-7.2

Added a custom icon for Gravity Forms 2.5.

1.0-beta-7.1

Updated the Swedish translations.

1.0-beta-7 | 2020-09-28

Fixed an issue with the feed settings.

1.0-beta-6 | 2020-09-24

Added support for Gravity Forms 2.5

1.0-beta-5 | 2020-08-05

Added support for WordPress 5.5.
Updated Post Format labels to be translatable.
Fixed a JavaScript error with WordPress 5.5 which prevents the taxonomy settings rendering correctly.
Fixed an issue where pending and draft posts created via the add-on do not have the correct post creation date when the date mappings are used in the post creation feed.
Fixed an issue where merge tags used in the custom value inputs of the categories and tags feed settings are not processed.

1.0-beta-4 | 2020-05-07

Added translations for Hebrew, Hindi, Japanese, and Turkish.
Added the {apc_media} merge tag to insert IDs or URLs of files uploaded to media library.
Updated Javascript files, stylesheets to use minified versions.
Fixed an issue where a taxonomy mapping which is removed on the feed configuration page can still be processed.
Fixed an issue where the wrong user could be assigned as the media author.
Fixed an issue attaching uploaded images as a featured image for a post when the image file has uppercase characters in the file extension.

1.0-beta-3 | 2019-08-07

Added security enhancements.
Added support for delaying feed processing until after payment has been successfully completed using the PayPal Standard Add-On.
Added the gform_advancedpostcreation_args_pre_get_custom_post_types filter enabling the arguments used to get the custom post types for inclusion in the types setting to be overridden.
Added the gform_advancedpostcreation_file_fields_choices filter enabling the available choices for the media settings to be overridden on the feed configuration page.
Added the gform_advancedpostcreation_term_separator filter enabling the ability to override the default comma separator with another string when terms are being assigned from the value of a field on a form with a post creation feed set up.
Added additional logging statements.
Updated + and - icons so that they are consistent across all settings.

1.0-beta-2 | 2019-03-20

Added support for {post_id} and {post_edit_url} merge tags.
Added support for setting post author when user is registered with User Registration Add-On.
Fixed an issue getting the default merge tags for the title, content, and excerpt settings when creating a new feed.
Fixed an issue where files could fail to be added to the media library on servers where allow_url_fopen is disabled.
Updated feed processing to store the uploaded media IDs in the entry meta along with the post and feed IDs.

1.0-beta-1 | 2019-01-10

It's all new!

Advanced Post Creation Add-On Using Third-Party Post Types

Advanced Post Creation Add-On Using Third-Party Post Types

IntroductionCreating Products for WooCommerceCreate the FormCreate the Advanced Post Creation FeedHandling Fields Unable to be MappedPriceCategoryPopulating Drop Down with Product CategoriesCreating Events for The Events CalendarCreate the FormCreate the Advanced Post Creation FeedHandling Fields Unable to be MappedPopulating Drop Down with Event CategoriesMatching up Images with Advanced Custom Fields (ACF) or other Custom FieldsMake sure the Field is copied to the Media LibraryMap the Image Field to the Custom Field

Introduction

One of the features of the Advanced Post Creation Add-On allows posts to be created upon form submission for third-party post types. This articles provides a guide on how to use Advanced Post Creation with the plugins WooCommerce, to create Products, and The Events Calendar, to create Events.

Note: This article assumes you have installed and activated the required plugins. If not, you will need to do so before any of the functionality in this article can be used.

Creating Products for WooCommerce

Create the Form

Several pieces of information need to be captured to create a Product. Below captures some basic information.

Field TypeLabelOther SettingsDrop DownCategorySee Populating Drop Down with Product Categories below for details.Single Line TextProduct Name ParagraphDescription NumberPriceSet the number format to currencyFile UploadProduct Image 

Create the Advanced Post Creation Feed

For more details about how to create the feed, review the Creating A Feed For The Advanced Post Creation Add-On article.

Expand the drop down for Type in the Post Settings section and select Product.

Scroll to the Post Content section and map the Title to the Product Name field.Map the Content to the Description field.Map the Featured Image to a File Upload field labeled Image. If the File Upload field is not present on your form this field will not appear in Post Creation settings.

Click Save Settings.

Note: The Price and Category will be handled separately because they cannot be directly mapped.

Handling Fields Unable to be Mapped

Not all fields needed for the product can directly be mapped in the feed. The gform_advancedpostcreation_post_after_creation action hook will be used to update the Price and Category for the product. Below are examples for two of the Product fields which need to be handled specially.

For more details about the hook parameters, placement, and usage, see the article mentioned above.

Price

The price information is stored in the wp_post_meta table and the update_post_meta() function will be used to save this information.

Category

The product category utilizes multiple WordPress taxonomy and term database tables and the wp_set_object_terms() function will be used to save this information.

The example below updates the Price using the value stored in field 7 of the entry. The Category is updated using the value stored in field 6 of the entry.

add_action( 'gform_advancedpostcreation_post_after_creation', 'update_product_information', 10, 4 );
function update_product_information( $post_id, $feed, $entry, $form ){

//update the prices set for the product
update_post_meta( $post_id, '_regular_price', $entry['7'] );
update_post_meta( $post_id, '_price', $entry['7'] );

//update the category
wp_set_object_terms( $post_id, $entry['6'], 'product_cat' );

}

Populating Drop Down with Product Categories

Note: This example expects the product categories to not have children. If there are child categories, the example will need to be modified as needed.

Several filters are needed to populate the drop down. The article Dynamically Populating Drop Down Or Radio Buttons Fields has more information. The filters used are:

gform_pre_rendergform_pre_submission_filtergform_admin_pre_rendergform_pre_validation

add_filter( 'gform_pre_render_83', 'populate_dropdown_with_product_categories' );
add_filter( 'gform_pre_submission_filter_83', 'populate_dropdown_with_product_categories' );
add_filter( 'gform_admin_pre_render_83', 'populate_dropdown_with_product_categories' );
add_filter( 'gform_pre_validation_83', 'populate_dropdown_with_product_categories' );
function populate_dropdown_with_product_categories( $form ) {
//product_cat is the taxonomy for WooCommerce's products
//get the terms for the product_cat taxonomy
$product_categories = get_terms( 'product_cat' );

//Creating drop down item array.
$items = array();

//Adding initial blank value.
$items[] = array( 'text' => '', 'value' => '' );

//Adding product category terms to the items array
foreach ( $product_categories as $product_category ) {
$items[] = array( 'value' => $product_category->name, 'text' => $product_category->name );
}

//Adding items to field id 6. Replace 6 with your actual field id. You can get the field id by looking at the input name in the markup.
foreach ( $form['fields'] as &$field ) {
if ( $field->id == 6 ) {
$field->choices = $items;
}
}

return $form;
}

Creating Events for The Events Calendar

Create the Form

Several pieces of information need to be captured to create an Event. Below captures some basic information.

Create a new form and add the following fields.

TypeLabelOther SettingsDrop DownCategorySee Populating Drop Down with Event Categories below for details.Single Line TextEvent Title ParagraphEvent Description CheckboxesEvent OptionsChoices: All Day, Hide From Event Listings, Sticky in Month View, Feature EventDateStart Date TimeStart TimeConditional Logic: Show field if Event Options is not All DayDateEnd Date TimeEnd TimeConditional Logic: Show field if Event Options is not All Day

Create the Advanced Post Creation Feed

For more details about how to create the feed, review the Creating A Feed For The Advanced Post Creation Add-On article.

Expand the drop down for Type in the Post Settings section and select Event.

Scroll to the Post Content section and map the Title to the Event Title field.Map the Content to the Event Description field.Scroll to the Taxonomies section and map the Event Categories to Field Value and Category field.

Click Save Settings.

Handling Fields Unable to be Mapped

Not all fields needed for the event can directly be mapped in the feed. The gform_advancedpostcreation_post_after_creation action hook will be used to update these fields. Below are examples for several fields which need to be handled specially.

For more details about the hook parameters, placement, and usage, see the article mentioned above.

add_action( 'gform_advancedpostcreation_post_after_creation', 'update_event_information', 10, 4 );
function update_event_information( $post_id, $feed, $entry, $form ){
//update the All Day setting
$all_day = $entry['9.1'];
if ( $all_day == 'All Day' ){
update_post_meta( $post_id, '_EventAllDay', 'yes');
}

//update the Hide From Monthly View Setting
$hide = $entry['9.2'];
if ( $hide == 'Hide From Event Listings') {
update_post_meta( $post_id, '_EventHideFromUpcoming', 'yes' );
}

//update the Sticky in Month View setting
$sticky = $entry['9.3'];
if ( $sticky == 'Sticky in Month View' ){
wp_update_post(array( 'ID' => $post_id, 'menu_order' => '-1' ) );
}
else{
wp_update_post(array( 'ID' => $post_id, 'menu_order' => '0' ) );
}

//update the Feature Event setting
$feature = $entry['9.4'];
if ( $feature == 'Feature Event'){
update_post_meta( $post_id, '_tribe_featured', '1');
}
else{
update_post_meta( $post_id, '_tribe_featured', '0');
}
}

Populating Drop Down with Event Categories

Several filters are needed to populate the drop down. The article Dynamically Populating Drop Down Or Radio Buttons Fields has more information. The filters used are:

gform_pre_rendergform_pre_submission_filtergform_admin_pre_rendergform_pre_validation

//target form 80 (change to your form id)
add_filter( 'gform_pre_render_80', 'populate_dropdown_with_event_categories' );
add_filter( 'gform_pre_submission_filter_80', 'populate_dropdown_with_event_categories' );
add_filter( 'gform_admin_pre_render_80', 'populate_dropdown_with_event_categories' );
add_filter( 'gform_pre_validation_80', 'populate_dropdown_with_event_categories' );
function populate_dropdown_with_event_categories( $form ) {

$event_categories = get_terms( array('taxonomy'=>'tribe_events_cat','hide_empty'=>0 ) );
//Creating drop down item array.
$items = array();

//Adding initial blank value.
$items[] = array( 'text' => '', 'value' => '' );

//Adding product category terms to the items array
foreach ( $event_categories as $event_category ) {
$items[] = array( 'value' => $event_category->name, 'text' => $event_category->name );
}

//Adding items to field id 10. Replace 10 with your actual field id. You can get the field id by looking at the input name in the markup.
foreach ( $form['fields'] as &$field ) {
if ( $field->id == 10 ) {
$field->choices = $items;
}
}

return $form;
}

Matching up Images with Advanced Custom Fields (ACF) or other Custom Fields

When images are stored to Custom Fields, they are written into Custom Post Meta with a value of the ID (or an array of id』s) that link to the Image in the Media Library. In order to properly map an Image Custom Field to an Upload Field added from Gravity Forms, you need to use the {apc_media} merge tag in the Custom Field Mapping for the Advanced Post Creation Feed.

Make sure the Field is copied to the Media Library

The file will not be available to be mapped properly to the Custom Meta if you don』t also copy that file to the Media Library. As long as you have added your image field as a File Upload Field, it will be available to copy the field to the Media Library. This will make sure that the field has a Post ID that is the 『Image ID』 in ACF and other Custom Field plugins.

Map the Image Field to the Custom Field

You will need to perform this step for each image field you』re adding.

Under Custom Fields, Add a field mapping for your Image field. Select the 『name』 of the field under Name.Under Value, Select 「Add a Custom Value」Use the Merge Tag Tool to select your Image Field to place it』s merge tag in the ValueReplace the 「Field Name」 in the Merge tag with the apc_media merge tag actionAdd ids or urls as the return type to the end of your image tag