Importing a Form

Importing a Form

Importing a form into Gravity Forms is a very easy process due to the simplicity of the import/export tool. In this article, we will show you how to easily import a form that you have previously exported using Gravity Forms.
Note: This article assumes that you have already exported your forms and saved them in a JSON file. If you have not already done so, review our article on exporting forms using Gravity Forms. You cannot use this process to import forms from other Form formats.

First, log into your WordPress admin dashboard.
Once logged in, hover over Forms and click on Import/Export.
On the next page, click on the tab labeled Import Forms.
From here, click on the Browse button and navigate to the form settings file that you need to import. As noted above, our Form exports into JSON files and will have the .json extension. Then, click the Import button.

If successful, you should see a message on the top of the page stating that the form has been imported successfully. You should now see the form appropriately listed with the rest of your forms.

iContact Feed Meta

iContact Feed Meta

IntroductionUsagePropertiesCustom Field Properties

Introduction
The Feed Object meta for the iContact add-on is an associative array containing the properties which determine how the add-on should process the form submission.
$feed['meta'] = array(
'feed_name' => 'Your Feed Name',
'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

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

list string
The ID of the iContact list this feed will add contacts to.

fields_email string
The ID of the field containing the user』s email address. Required.

fields_prefix string
The ID of the field containing the user』s name prefix.

fields_first_name string
The ID of the field containing the user』s first name.

fields_last_name string
The ID of the field containing the user』s last name.

fields_suffix string
The ID of the field containing the user』s name suffix.

fields_street string
The ID of the field containing the first line of the customer』s address.

fields_street2 string
The ID of the field containing the second line of the customer』s address.

fields_city string
The ID of the field containing the customer』s city.

fields_state string
The ID of the field containing the customer』s state.

fields_postal_code string
The ID of the field containing the customer』s postal code.

fields_phone string
The ID of the field containing the user』s phone number.

fields_fax string
The ID of the field containing the user』s fax number.

fields_business string
The ID of the field containing the user』s business number.

custom_fields array
A multidimensional array containing the iContact custom fields. See Custom Field Properties.

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
Each custom field is an associative array containing the following properties:

key integer
The iContact custom field ID.

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

iContact Change Log

iContact Change Log

1.5 | 2020-09-081.4 | 2020-03-241.3 | 2018-03-301.2 | 2016-08-311.1 | 2015-12-161.0 | 2015-05-20

1.5 | 2020-09-08

Added support for Gravity Forms 2.5.
Fixed a PHP fatal error which occurs when accessing an existing feed which was created by a different iContact account.

1.4 | 2020-03-24

Added translations for Hebrew, Hindi, Japanese, and Turkish.
Updated account username setting label.
Updated stylesheets to use minified versions.
Fixed PHP 7.4 notices which occur when the API is initializing and the settings are empty.
Fixed a PHP 7.4 notice which occurs on the feed configuration page when saving a new feed.
Fixed the width of the Feed Name setting on the feed configuration page.

1.3 | 2018-03-30

Added security enhancements.
Added GPL to plugin header.
Added the gform_icontact_request_args hook allowing customers to modify the options array before sending requests to iContact.
Updated Plugin URI and Author URI to use https.
Fixed PHP notice on the add-on settings page.
Fixed strings for translations.
Increased limit for number of client folders retrieved from iContact.

1.2 | 2016-08-31

Added feed duplication support.
Added support for delaying feed processing until payment by PayPal Standard is successfully completed.
Fixed an issue with the request failed message.

1.1 | 2015-12-16

Added auto-mapping of first name and last name fields if only one name field exists.
Added client folder option to plugin settings.
Added default name for new feeds.
Added gf_icontact() for easily getting an iContact instance.
Fixed PHP warning during feed processing.
Updated feed processing to abort if value of mapped Email Address field is invalid.
Updated feed processing to use add_feed_error().
Updated feed field mapping styling.
Updated feed settings to support more than 20 iContact lists.

1.0 | 2015-05-20

It's all new!

Setting Up the iContact Add-On

Setting Up the iContact Add-On

Pre-RequisitesSetupCreating an iContact Application IDAdd-on Framework Hooks

Pre-Requisites

Download and install the add-on
An iContact account

Setup

Log into your WordPress admin dashboard.
On the left side navigation menu, hover over Forms and click on Settings.
From this page, click the iContact tab.
Enter your Application ID, Account Email Address, API Password, and select the Client Folder. This is obtained from iContact. See below for instructions on how to create an application ID.
Click Update Settings. If you』ve entered your account information correctly, you will be notified by green check marks beside each box. If you do not see green check marks, please double check this information and try again.

Creating an iContact Application ID

Visit the iContact application registration page.
Set an application name and description for your application.
Choose to show information for API 2.0.
Copy the provided API-AppId into the Application ID settings field.
Click 「Enable this AppId for your account」.
Create a password for your application and click save.
Enter your API password, along with your iContact account username, into the settings fields.

Once you have entered your API information, you』re ready to begin creating a feed for the iContact Add-On.
Add-on Framework Hooks
Because the iContact Add-On is built using the Add-On Framework it also inherits any hooks available in the framework methods it uses such as:

gform_short_slug_field_value for changing a field value before it is passed to iContact.

HubSpot Change Log

HubSpot Change Log

1.7 | 2021-11-101.6 | 2021-10-121.5 | 2020-09-231.4 | 2020-07-141.3 | 2020-05-181.2 | 2019-10-231.1 | 2019-08-071.0 | 2019-07-18

1.7 | 2021-11-10

Updated the styling for the disconnect alert messaging.
Fixed an issue where the disconnect from HubSpot button doesn't show when used with Gravity Forms 2.4.
Fixed an issue where the lead status and lifecycle stage fields are missing from the feed configuration page.
Fixed an issue where the add-on is disconnected after HubSpot reduced auth token lifespan from 6 hours to 30 minutes.

1.6 | 2021-10-12

Added a button in the add-on settings page to manually clear the contact custom properties cache.
Added support for mapping single checkbox, multiple checkboxes, dropdown select, and radio select type HubSpot properties.
Added security enhancements.
Fixed an issue where a notice appears on the feed settings edit page.
Fixed fatal errors that can occur when the Hubspot API returns an error while updating feed settings.
Fixed an issue where authentication may not complete after attempting a connection with HubSpot.
Fixed issue where conditional Contact Owner feed settings are not getting saved.

1.5 | 2020-09-23

Added support for Gravity Forms 2.5.
Fixed PHP warnings and notices which occur when the request to the HubSpot API to get the contact properties fails.

1.4 | 2020-07-14

Added security enhancements.

1.3 | 2020-05-18

Added translations for Hebrew, Hindi, Japanese, and Turkish.
Added support for feed duplication.
Fixed a PHP 7.4 notice which can occur when generating the HubSpot form for a feed outside the Form Settings area.
Fixed an issue with the position in the Form Settings menu when multiple add-ons are installed.

1.2 | 2019-10-23

Updated the text in the add-on settings.
Updated the submission process to always send the IP address to Hubspot unless saving of the submitter IP is disabled in a form's personal data settings.
Fixed an issue where references to the add-on would appear as "Gravity Forms HubSpot Add-On Add-On."
Fixed an issue where HubSpot users without names display as empty labels when assigning contact owner(s) for a feed.

1.1 | 2019-08-07

Added security enhancements.

1.0 | 2019-07-18

All new!

HTML

HTML

SummaryCommon SettingsGeneral SettingsMerge Tags

Summary

The HTML field allows you to place a block of free form HTML anywhere in your form. This is useful for adding images or additional content. It is available under the Standard Fields section within the form editor.

HTML field as displayed in the Field Library

HTML field as displayed in the Form Editor.

Common Settings

This field uses only common field settings for the Appearance and Advanced settings. For a description of each of the common field settings, refer to this article. Below you will find description of specialty settings that are particular to this field.

General Settings

SettingDescriptionField LabelEnter the label for this HTML block. It will help you identify your HTML blocks in the form editor, but it will not be displayed on the form.ContentEnter the content (Text or HTML) to be displayed on the form.

Merge Tags

HTML fields are display only fields, not saved in the entry, therefore they don』t have a merge tag.

HTML Field CSS Selectors

HTML Field CSS Selectors

example: HTML field (li) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield_html {border: 1px solid red}
example: HTML field (li) – applies just to form ID #1
1body #gform_wrapper_1 .gform_body .gform_fields .gfield_html {border: 1px solid red}
example: HTML field (li) – applies just to specific HTML field (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body .gform_wrapper .gform_body .gform_fields #field_XX_X.gfield_html {border: 1px solid red}

How to Separate Product Selection and Price When Exporting Entries

How to Separate Product Selection and Price When Exporting Entries

By default, export columns which separate the product name and the product price are available for single product fields. However, these export columns are not available for product fields that present choices (i.e. with a field type of dropdown or radio buttons).

The following code block, when added to your site, will append options on your Export Entries screen for Product (Name), Product (Value), and Product (Price). These new columns will be available for all choice Product fields – including the Option and Shipping fields. It will also enable similar export columns (to show name and value) for Radio fields.

If you want to customize the heading labels in the export, this will also respect any Admin Labels you have set for the fields.

//Add export columns for label, value, and price of single choice fields
add_filter( 'gform_export_fields', function( $form ) {

foreach ( $form['fields'] as $key => $field ) {

$is_product_like_field = ( $field->type == 'product' || $field->type == 'option' || $field->type == 'shipping' ) ? true : false;

if ( ( $is_product_like_field || $field->type == 'radio' ) && is_array( $field->choices ) ) {

// unset( $form['fields'][ $key ] ); // uncomment to remove the original field from the export list

// append our additional columns
array_push( $form['fields'], array( 'id' => $field->id.'_text', 'label' => $field->label.' (Name)' ) );
array_push( $form['fields'], array( 'id' => $field->id.'_value', 'label' => $field->label.' (Value)' ) );
if ( $is_product_like_field ) {
array_push( $form['fields'], array( 'id' => $field->id.'_price', 'label' => $field->label.' (Price)' ) );
}

// set the headers for each added column
add_filter( "gform_entries_field_header_pre_export_{$form['id']}_{$field->id}_text", function( $header, $form, $export_field ) {
return $header.' (Name)';
}, 10, 3 );
add_filter( "gform_entries_field_header_pre_export_{$form['id']}_{$field->id}_value", function( $header, $form, $export_field ) {
return $header.' (Value)';
}, 10, 3 );
if ( $is_product_like_field ) {
add_filter( "gform_entries_field_header_pre_export_{$form['id']}_{$field->id}_price", function( $header, $form, $export_field ) {
return $header.' (Price)';
}, 10, 3 );
}

// set the values for each added column
add_filter( 'gform_export_field_value', function( $value, $form_id, $field_id, $entry ) use ( $field ) {

$product_data = explode( '|', rgar( $entry, $field->id ) );
$product_choice = array_filter( $field->choices, function( $choice ) use ( $product_data ) {
return ( $choice['value'] == $product_data[0] );
} );
$product_choice = array_values( $product_choice );

switch ( $field_id ) {
case $field->id.'_text':
return $product_choice[0]['text'];
break;
case $field->id.'_value':
return $product_data[0];
break;
case $field->id.'_price':
return $product_data[1];
break;
default:
return $value;
break;
}

}, 10, 4 );

}

}

return $form;

} );

For additional information on the filters in use:

gform_export_fieldsgform_entries_field_header_pre_exportgform_export_field_value

How To Report a Security Issue

How To Report a Security Issue

Steps to take before reportingEnsure Gravity Forms is fully updated to the latest versionEnsure all Gravity Forms addons are updatedSubmitting a security report

Note: this article is not intended for security researchers. If you』re a researcher see information for security researchers.
We take security issues very seriously and want to ensure that you always feel safe when using Gravity Forms. Here are a few steps you should take if you believe you have a security issue with Gravity Forms.
Steps to take before reporting
Ensure Gravity Forms is fully updated to the latest version
First, be sure that you have the latest version of Gravity Forms. If not, you may be running an older version in which we have already patched the issue in a newer version. We strive to keep newer versions compatible with any existing implementation you have, so you should see minimal, if any issues at all, from updates.
Ensure all Gravity Forms addons are updated
Whether you are using official or third party addons, be sure that they are all fully updated. Just as keeping Gravity Forms updated is important to your site』s health, keeping your addons up to date are just as important.
Submitting a security report
If you have ensured that the security issue is indeed a current one, we want to know as soon as possible.

First, be sure to gather all information possible. This includes what has been affected, as well as the potential exploit. Providing thorough information will help us release a patch much quicker.
Open a ticket using our Contact Us form as soon as possible, selecting the 「I Am Reporting a Security Vulnerability」 choice. We have individuals in various locations across the world, that will be able to review your concern quickly.
We will confirm receipt of your security concern as soon as possible.

How to Manually Update Gravity Forms

How to Manually Update Gravity Forms

Using the WordPress Admin DashboardUsing the WP-CLI

WARNING: Do NOT use the Uninstall [plugin] button in the Forms > Settings area – this will remove your form data.

When you follow the steps below, all your data (forms, entries, feeds, settings etc.) will remain untouched. But we still recommend you back up your database and files before installing or updating any plugin.

Using the WordPress Admin Dashboard

If you haven』t already done so, download the Gravity Forms or Add-On zip from the downloads page. Be sure to save this zip file somewhere easily accessible as you will need it soon.From within your WordPress admin dashboard, hover over Plugins on the left side navigation menu and click on Add New.Click the Upload Plugin button.Click the Browse button.Navigate to the zip file you previously downloaded and select it.Once the file is selected, click the Install Now button.On the Installing plugin from uploaded file page click the Replace current with uploaded button.

For older WordPress versions prior to 5.5, try this guide.

Using the WP-CLI

If your webhost supports WP-CLI you can update Gravity Forms and the Add-Ons from the command line. Don』t already have the Gravity Forms CLI add-on installed? Install it today using the following WP CLI command: wp plugin install gravityformscli --activate

See the Managing Gravity Forms and Add-Ons with WP-CLI article for more details.