Setting Up the Stripe Add-On (version 2.7 and earlier)

Setting Up the Stripe Add-On (version 2.7 and earlier)

Pre-RequisitesStripe SettingsStripe APIPayment Collection (available in Stripe v2.6 and later)Stripe Webhooks

The Stripe settings layout was modified in Stripe Add-On version 2.8. For current versions, refer to our updated article.This article is for users of version 2.7 or earlier.
Pre-Requisites

Gravity Forms and Gravity Forms Stripe Add-On installed
SSL Certificate Installed and Configured
A Stripe account

Stripe Settings
The Stripe Settings will allow you to connect and authenticate with your Stripe account and make some choices about how you collect payment information. Additionally, it will allow you to setup webhooks which are used to communicate events from Stripe back to your Gravity Forms environment.
Navigate to your Stripe Add-On Settings page:

Log into your WordPress admin dashboard.
On the left side navigation menu, hover over Forms and click on Settings.
Click the Stripe tab.

Stripe API
Allows you to specify the environment you want to send your form submission to. Choosing Live will initiate real transactions, while Test will run the form entry into your Stripe test environment, which should not generate any real transactions.

Select the API to use for Stripe integration: Live or Test. Live is for real transactions, and Test is for testing the integration and submitting test forms.
Enter the Live Publishable Key and Live Secret Key for your Stripe account if using Live mode. Or enter the Test Publishable Key and Test Secret Key for your Stripe account if using Test mode. For details on how to get your API information, refer to Obtaining Your Stripe API Keys.
Click Update Settings.

If you』ve entered your API 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.

Payment Collection (available in Stripe v2.6 and later)

This option was introduced in Stripe version 6. It is not on the Settings page for earlier versions.

Scroll to the Payment Collection section.
Select the Payment Collection Method to determine how payment information will be obtained on your form. Refer to this article for more information on the payment collection methods offered.

Stripe Webhooks

Log in here to access your Stripe Webhooks management page.
In Stripe, click the Add endpoint button at the top right above the list of webhooks.
Note: There is a maximum limit of 16 webhook endpoints per Stripe account.
In the Endpoint URL field, paste the URL found under 「View Instructions」 on the Gravity Forms Stripe Settings page (see screenshot below).
Under Version, select the Latest API Version if available (see screenshot below).

Under Events to send, click receive all events from within the box (see screenshot below).
Click the Add endpoint button to save the webhook (see screenshot below).
Under Signing secret, click the 「Click to reveal」 button.
Copy the signing secret and note the Mode at the top of the screen.
Enter the Signing Secret from the Stripe Webhooks page into the Stripe settings. Use the Test Signing secret or Live Signing secret field as applicable.
Check the I have enabled the Gravity Forms webhook URL in my Stripe account. box.
Click Update Settings.

Screenshot: Adding a Webhooks endpoint in Stripe
Once you have entered your Stripe settings, you』re ready to begin Setting Up a Stripe Compatible Form.

Creating a Feed for the Stripe Add-On

Creating a Feed for the Stripe Add-On

Pre-RequisitesIntroductionCreate Your FeedTesting

The Stripe feed settings were modified in Stripe Add-On version 3.0. For setting up older versions, refer to this article.

Pre-Requisites

Setup the Stripe Add-OnCreate a Stripe Compatible Form

Introduction

The last step of integrating Stripe with Gravity Forms is creating a feed. A feed communicates information to Stripe each time a visitor successfully submits your form. This is a critical step. If it is not completed, nothing is sent to Stripe for processing.

Create Your Feed

Open the form you want to link to Stripe, or create one using this guide: setting-up-a-stripe-compatible-form. Select Forms from your WordPress dashboard to view your forms. Hover hover over Settings of the form you would like to add Stripe to, and select Stripe from the dropdown.

You will be directed to a Stripe Feeds page. Select Add New or Create One to begin creating your Stripe Feed.Give your Feed a unique Name. This prevents any trouble with distinguishing the feed later on. It is not displayed to the user. See notes below. Select the Transaction Type. Products and Services are single one time payments while Subscription is a recurring payment.

You will then need to complete the various panels of Feed Settings to define how you feed should work. Refer to our Feed Settings Reference document for a full description of all settings.

Testing

There is a large amount of settings required for payment gateways, and their proper functioning is probably key to your forms operation. Verify that your Stripe integration is functioning as expected. We recommend sandbox testing for all form changes and before installing add-on updates in your production environment.

See also this article on verifying your Stripe Integration.

Setting Up the Twilio Add-On

Setting Up the Twilio Add-On

Pre-RequisitesSetupTwilio Account InformationBitly Account InformationNext Step: Create a FeedScreenshots

Pre-Requisites

Download and install the add-on
A Twilio 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 Twilio tab. Here you will see two sections, one for Twilio Account information, and one for your Bitly account information.

Twilio Account Information

Select your API Mode.
Enter your Account SID, Auth Token, Test Account SID, and Test Auth Token. These are obtained from Twilio. If you are unsure of how to obtain your account information, take a look at our article on Obtaining Your Twilio API Key.

Bitly Account Information
You can integrate your links with Bitly for shortening and tracking. You will need to generate an access token. Refer to your Bitly account settings, or see this article from their documentation pages.
Note: As of September 14th, 2020, Bitly have deprecated all earlier API versions, and now require all authentication to happen via OAuth (deprecating their older API key integration method). If you notice that URLs for a previously working feed are no longer being shortened, visit the Settings page described in this article, and confirm that you have properly entered a Bitly OAuth token.
Next Step: Create a Feed
Once all your settings are complete, click Save Settings. If you』ve entered your account information correctly, you will be notified by a green check mark beside each box. If you do not see green check marks, double check this information and try again.
Now you are ready to begin creating a feed for the Twilio Add-On.
Screenshots
Image: the official Gravity Forms Twilio Add-On Settings page.

Setting Up the Zapier Add-On

Setting Up the Zapier Add-On

Pre-RequisitesTerms UsedSetupCreate a REST API Key to Connect to ZapierAuthenticating at ZapierChanges Between Zapier Add-On 4.0 and Prior VersionsApp Connection (Zapier v2.0+) – REST APIZap Connection (Zapier v1.0) – Legacy WebhookTroubleshooting Connections with ZapierConclusion

Pre-Requisites

Download and install the add-onA Zapier accountSigning up can be done quickly and easily and includes a 14-day free trial which gives you access to every regular and premium app. After the free trial, you can continue to use the free plan or select one of the available premium plans.An account that has the gravityforms_edit_forms capability, for use in the REST API Settings.SSL Certificate Installed and ConfiguredWebsite accessible to the Internet. The authentication from Zapier to Gravity Forms uses REST API so your website must be accessible to Zapier.

Terms Used

There are two ends to a communication between Zapier and your Gravity Forms, and it is important to distinguish which one is being referred to in the user documentation.

Zapier Add-On (or Gravity Forms Zapier Add-On), refers to the add-on module that is developed and published by Gravity Forms, and made available to Gravity Forms active license holders with the appropriate license type. The Gravity Forms Zapier Add-On is developed and supported by Gravity Forms.Zapier』s Gravity Forms app or Gravity Forms app refers to the Gravity Forms integration application that is developed and supported by Zapier. These apps are made available within the Zapier environment for use in Zaps. Zapier apps are developed and supported by Zapier.Zapier Account Dashboard refers to the account portal provided by Zapier for registered users to login and manage Zapier applications. See this link.

Setup

Create a REST API Key to Connect to Zapier

To establish communication between your WordPress site and Zapier, you will need to create a Gravity Forms REST API 2 key to identify your connection to Zapier.

The user selected when creating the REST API key must be assigned to a role which has the gravityforms_edit_forms capability.

Follow these steps in the Forms > Settings > REST API to create a new Consumer Key and Consumer Secret. Save this information in a secure place as you will need it for the next step to Authenticate at Zapier and you will not be able to edit or access this information again without creating a new REST API key.

Authenticating at Zapier

Now that you have your Consumer Key & Consumer Secret, go into My Apps in your Zapier Account Dashboard, click on Add Connection and search for Gravity Forms

Click on Gravity Forms and you』ll be presented with an Authentication screen from Zapier to 「Allow Zapier to access your Gravity Forms Account」

Complete the steps to authenticate with your website through REST API:

Site URL: The Site URL is the base website URL where your form resides, ie https://jimmyspizza.com or https://shops.sallysdoughnuts.com. You can pull the Site URL from your Settings > General > Site URL in the WordPress dashboard.Consumer Key: Collected from your step above when creating the REST API KeyConsumer Secret: Collected from the step above when creating the REST API key.

If your connection is successful, you』ll be returned to your Gravity Forms connections in the Zapier Account Dashboard and your new connection will be listed:

If your connection is not successful, you』ll be presented with an error in the Authentication dialogue and you will need to begin troubleshooting your connection or open a Support Ticket with Gravity Forms.

Once you have installed and authenticated the Zapier Add-On, you』re ready to begin using the Zapier Add-On.

Changes Between Zapier Add-On 4.0 and Prior Versions

Under prior versions of our Zapier Add-On, authentication to Zapier was managed at Zapier under Zaps with a webhook provided by Zapier and entered under the Zapier Feed Settings for each individual form. This was the Zapier v1.0 connection.

Under the current version of the Add-On that supports Zapier v2.0, authentication is managed at Zapier under My Apps using the REST API settings in Gravity Forms, Forms, Settings, REST API to create a website specific connection for Zapier. This allows you to have one App for each website under the Zapier Add-On for Gravity Forms and you can use the same Zapier App connection to manage multiple forms in your Zaps.

When troubleshooting your existing Zaps, you』ll know if your Zap is an 「App Connection」 (Current) or a 「Zap Connection」 (pre 4.0) if:

App Connection (Zapier v2.0+) – REST API

Gravity Forms REST API Connection in Zapier

Gravity Forms App under Custom Integrations in Zapier includes 『Gravity Forms』 (see screenshot above)Feed exists for the form within Gravity Forms (if you have toggled on Feed Visibility), but you can only edit Conditional Logic. All other feed settings are maintained at Zapier. Feed URL starts with (https://hooks.zapier.com/hooks/standard/*)

Zap Connection (Zapier v1.0) – Legacy Webhook

Gravity Forms Legacy (Webhook) Connection in Zapier

Gravity Forms App under Custom Integrations in Zapier includes 『Legacy』 and 『Gravity Forms (1.1.0)』 (see screenshot above)Feed exists for the form within Gravity Forms and you can edit all details for the feed. Feed URL starts with (https://hooks.zapier.com/hooks/catch/*)

Troubleshooting Connections with Zapier

If you run into issues connecting the Zapier Add-On at Zapier, please check out Troubleshooting the Zapier Add-On to help you get connected properly.

Conclusion

After you have installed and activated the Zapier Add-On, there is not much you need to do until you are ready to integrate a form with Zapier. There are no global settings or API keys that must be configured.

The Zapier Settings page that appears within the global Settings in Gravity Forms is only for uninstalling the Zapier Add-On and its associated data in your WordPress database. Zapier integration takes place primarily on the Zapier site itself and then from within the Form Settings of a form you would like to integrate with Zapier.

Once you have installed and activated the Zapier Add-On, you』re ready to begin using the Zapier Add-On.

Setting Up the Zoho CRM Add-On

Setting Up the Zoho CRM Add-On

Pre-RequisitesZoho CRM SettingsAuthentication (v1.8)Authentication (v1.7 and below)ScreenshotsA. OAuth Authentication MethodB. Email Address and Password Authentication MethodC. Third Party Service (Google Apps, Facebook, Yahoo) Authentication Method

Pre-Requisites

Download and install the add-on
A Zoho CRM account

IMPORTANT: Zoho CRM』s API Version 1.0 has been deprecated and will no longer work as of 12/31/2019. You MUST switch to the OAuth Authentication Method, which uses API Version 2.0, by this time in order for continuous operation of the Zoho CRM add-on.
Until you have switched to the OAuth Authentication option, you will see the message 「Zoho CRM』s v1 API has been deprecated. To use the v2 API, please switch your Zoho CRM Authentication method to OAuth Authentication.」 in your Dashboard.

Zoho CRM Settings

Log into your WordPress admin dashboard.
On the left side navigation menu, hover over Forms and click on Settings.
From this page, click the Zoho CRM tab.

Authentication (v1.8)

Click the 「Connect to Zoho CRM」 button.

Click the 「Accept」 button to allow the Gravity API access to the data in your Zoho account.

Authentication (v1.7 and below)

Choose a method of authentication.
a. OAuth Authentication (recommended) Screenshot A
This authentication method is available as of Zoho CRM Add-On version 1.6 and uses Version 2.0 of Zoho CRM』s API. This new API replaces version 1.0, which will no longer work as of 12/31/2019. This option MUST be used for Zoho CRM by then and you are encouraged to switch before its end-of-life date.

Click the button to authenticate with Zoho CRM. If authenticated, the text 「Signed into Zoho CRM.」 will display with a De-authorize button.

b. Email Address and Password Screenshot B
This authentication method uses Zoho CRM』s original API, Version 1.0. This API has been deprecated and will no longer work as of 12/31/2019. You must switch to the OAuth Authentication option by then. If the OAuth Authentication option is not available, please download the latest Zoho CRM Add-On.

Enter your Zoho CRM Email Address and Password.
Click Update Settings. If you have entered your account information correctly, you will be notified by a green check mark beside each box. If you do not see green check marks, please double check this information and try again.

c. Third Party Service (Google Apps, Facebook, Yahoo) Screenshot C
This authentication method uses Zoho CRM』s original API, Version 1.0. This API has been deprecated and will no longer work as of 12/31/2019. You must switch to the OAuth Authentication option by then. If the OAuth Authentication option is not available, please download the latest Zoho CRM Add-On.

Click the button to generate an authentication token.
Enter the token.
Click Update Settings. If the token is correct, a green check mark will appear next to the button.
Once you have authenticated, you are ready to begin creating a feed for the Zoho CRM Add-On.

Note: If your Zoho CRM account is hosted in the EU, you will need to configure the add-on accordingly. See the Zoho European Hosted Accounts page for more information.
Screenshots
A. OAuth Authentication Method

B. Email Address and Password Authentication Method

C. Third Party Service (Google Apps, Facebook, Yahoo) Authentication Method

Creating a Feed for the Zapier Add-On

Creating a Feed for the Zapier Add-On

SummaryDefinitionsFeed VisibilityEditing FeedsWhy Would I Need to Edit Feeds?Editing Modern FeedsCreating a Feed for Legacy ZapsFeed Settings Screen

Summary
A feed sends information between Gravity Forms and Zapier. How Zapier and Gravity Forms display and configure feeds has changed with Zapier v4 and the updated Gravity Forms apps from Zapier. Where previously the setup and logic of feeds were managed primarily within Gravity Forms, the newer versions now shift that creation, management and control to the Zapier system.
This article describes some of the nuances of Zapier feeds, and clarifies what you can manage from within Gravity Forms.
Definitions

In this article, when we refer to 「Zapier』s system」 or 「Zapier』s interface「, we mean those settings and features you access from within the Zapier service.
「Gravity Forms Zapier settings」 or 「Zapier Add-On settings」 means we are referring to settings available from within your official Gravity Forms Zapier Add-On.
Zapier will create a feed to Gravity Forms whenever you create a Zap from within the Zapier system. Zapier call these automatically created feeds 「modern feeds「.
Feeds created from within the Gravity Forms Zapier Add-On prior to v4, are referred to as 「legacy feeds「.

Feed Visibility
Feeds are hidden by default within the Gravity Forms Feed page, unless the form has existing legacy feeds.
The display of Zapier feeds within the Form Settings can be toggled on or off from the Gravity Forms Zapier Plugin Settings page under Forms → Settings → Zapier.

Editing Feeds
Once you have enabled display of Zapier feeds as directed above, you will have access to the Gravity Forms Zapier Add-On Feeds page.

What you can create or edit within your Feeds page is dependent upon the type of feeds you have.
Why Would I Need to Edit Feeds?

You need Conditional Logic Enabled for the Zap. By Default if you have a Zap connected to your Form, it will always run a task against that Zap whenever the form is submitted. If you want to prevent this in specific situations, you can use conditional logic to prevent the Zapier task from running in specific situations.
You have a legacy feed. Feeds created prior to Zapier Add-On 4.0 have direct webhook authentication from Zapier to your form.

Editing Modern Feeds
Modern feeds have most of the fields marked as read-only. You can only edit the 『Admin Labels』 setting and 『Conditional Logic』 fields from within Gravity Forms Zapier Add-On. All other settings are managed from within the Zapier system.

Use Admin Labels? Select Yes for this option if you would like Admin Labels for your fields to be sent to Zapier instead of the Label for the field.
Enable Conditional Logic. If unchecked, every successful form submission will be sent to Zapier. If you wish to set specific conditions for sending form data to Zapier, then check the 「Enable」 box and fill out your required criteria.

WARNING: If you toggle a Zap to disable it within Zapier』s Settings, it will delete the feed in your Gravity Forms Zapier Add-On. This will delete any configurations you have added for Admin Labels and Conditional Logic. Toggling it back on in Zapier』s settings will create a new feed, which will not have any of the previous feeds settings. This is a known issue and we are working with Zapier to correct it.
Creating a Feed for Legacy Zaps
To create a legacy feed to Zapier using the Zapier Add-On for Gravity Forms, do the following from your WordPress Admin Dashboard:

Click on Forms in the left side menu.
Select the form that you want to use with Zapier.
Once within your desired form, hover over Settings and click on Zapier.
Click Add New to create a new feed. You will be presented with the Zapier feed settings screen.

Feed Settings Screen
The following fields are available within the settings screen. Refer to the settings screenshot below.

Create your Zap Name. This name is here to give you an idea of what Zap is being executed upon submission of the form.
It is important that you copy your webhook URL from Zapier.com. If you have it, paste it in the Webhook URL field. If you do not have your URL, visit Setting up your Zapier Zap to learn how to obtain it.
Under the Active option you can set the form submission status to be either active or inactive. By default this form is active. An inactive form will not trigger your action; however, an active form will.
The Use Admin Labels option allows you to send the field admin labels to Zapier when available.
Conditional Logic: If unchecked, every successful form submission will be sent to Zapier. If you wish to set specific conditions for sending form data to Zapier, then check the 「Enable」 box and fill out your required criteria.
Click the Save Zapier Feed button to save your options.

Setting Up a Legacy Zapier Zap

Setting Up a Legacy Zapier Zap

Pre-RequisitesIntroductionSetup

This guide applies to Zaps created with the legacy Zapier Gravity Forms Application. New Zaps created within Zapier with Gravity Forms (as either a trigger or an action) will look different now. Additionally, web hooks and feed setting are not required under the new REST API authentication. We are working on an updated version of this guide, but until then, please refer to the official Zapier documentation.
Pre-Requisites
Setup the Zapier add-on
Introduction
Zapier is an add-on that allows you to trigger an action upon submission of a form. Unlike some other plugins, Zapier does not require an API key to be configured, making this one of the easiest plugins to set up. All that needs to be done is create a form and map a feed.
Setup
If you would like to use a pre-existing form, you may skip to step 2. However, if you have not already created a form, you will need to create one in order to integrate the Zapier Add-On with Gravity Forms.

Create your form. No specific fields are required.
Create your Zap. Begin by logging in to your Zapier account. If you do not have an account, you can sign up for one here.
Click the Make a Zap! button located in the header of Zapier』s site.

Select Gravity Forms as your trigger application.

Then select New Form Submission as the trigger.

Click the Save + Continue button.
You will then be presented with the step to Pick A Sample To Set Up Your Zap. Directions on how to do this are displayed on the page and in the next few steps of this article.

Before you can click the 「OK, I did this」 button, you must set up your feed in Gravity Forms and add the displayed URL to your feed as the Webhook URL. To do this, go to the Settings for your form and select Zapier.

Click the Add New button.
Fill out the feed settings. First enter a Zap Name. Then copy the URL displayed on Zapier』s website into the Webhook URL. Next, mark the Zap as Active. Lastly, click the Save Zapier Feed button. Once you save the feed, the form fields and sample data are sent to Zapier which populates the fields available for use with the application to which you choose to send your data. For more information on setting up the feed, please see the Creating A Feed For The Zapier Add-On article.

Return to your setup on Zapier』s site and click the OK, I did this button.

The form submission pulled by the Zap will display. Click Continue.

You will see Almost finished here! Click the link to add the Action step.

Select your Action App and which action you wish to use. The action app is simply the application with which you want your submitted data to interact. In this example, we will be using Gmail. Each application has its own actions and steps to configure. If additional help is needed setting up the trigger or action application, check out Zapier』s documentation page.

Select the action you would like to happen when the form is submitted. In this case, we will be sending an email.

Click the Save + Continue button.
Finish the steps as necessary to configure your action app.
Test your action by clicking the Send Test button.
Once the testing is successful, click the Finish button.
Now it』s time to name your Zap, and turn it on.

Congratulations! You have successfully created a Zap!

Helper Functions

Helper Functions

Introductionadd_field_before()add_field_before() Exampleadd_field_after()add_field_after() Exampleremove_field()remove_field() Examplereplace_field()replace_field() Example 1 – Adding Donation to Transaction Type Drop Downreplace_field() Example 2 – Adding First and Last Name to Billing Information for Mappingget_field()get_field() Examplesettings_text()settings_textarea()settings_hidden()settings_radio()choices_have_icon()get_choice_attributes()settings_checkbox()checkbox_item()checkbox_input()checkbox_input_{$choice_name}()settings_select()get_select_options()get_select_option()settings_select_custom()settings_field_map()field_map_table_header()field_map_title()get_mapped_field_name()settings_field_map_select()get_field_map_choices()settings_field_select()get_form_fields_as_choices()settings_checkbox_and_select()settings_dynamic_field_map()settings_save()

Introduction
These helper functions may be used to remove, modify, and add fields when working with the Settings API
add_field_before()
$this->add_field_before( $name, $fields, $settings );

$name string
The name property of the field these fields should be inserted before.

$fields array
An array of fields to be inserted.

$settings array
The array of sections containing their current fields.

add_field_before() Example
This example uses the same code as the add field after example, with the only change being calling the add_field_before function and specifying the field to place it before as transactionType. This results in the same placement on the page as the other example.
public function feed_settings_fields() {
$default_settings = parent::feed_settings_fields();

//--add PayPal Email Address field
$fields = array(
array(
'name' => 'paypalEmail',
'label' => __( 'PayPal Email Address ', 'gravityformspaypal' ),
'type' => 'text',
'class' => 'medium',
'required' => true,
'tooltip' => '

' . __( 'PayPal Email Address', 'gravityformspaypal' ) . '

' . __( 'Enter the PayPal email address where payment should be received.', 'gravityformspaypal' )
),
array(
'name' => 'mode',
'label' => __( 'Mode', 'gravityformspaypal' ),
'type' => 'radio',
'choices' => array(
array( 'id' => 'gf_paypal_mode_production', 'label' => __( 'Production', 'gravityformspaypal' ), 'value' => 'production' ),
array( 'id' => 'gf_paypal_mode_test', 'label' => __( 'Test', 'gravityformspaypal' ), 'value' => 'test' ),

),
'horizontal' => true,
'default_value' => 'production',
'tooltip' => '

' . __( 'Mode', 'gravityformspaypal' ) . '

' . __( 'Select Production to receive live payments. Select Test for testing purposes when using the PayPal development sandbox.', 'gravityformspaypal' )
),
);

$default_settings = $this->add_field_before( 'transactionType', $fields, $default_settings );
return $default_settings;
}

add_field_after()
$this->add_field_after( $name, $fields, $settings );

$name string
The name property of the field these fields should be inserted after.

$fields array
An array of fields to be inserted.

$settings array
The array of sections containing their current fields.

add_field_after() Example
This example creates two new fields, PayPal Email Address and Mode, and places them right after the Feed Name field.
public function feed_settings_fields() {
$default_settings = parent::feed_settings_fields();

//--add PayPal Email Address field
$fields = array(
array(
'name' => 'paypalEmail',
'label' => __( 'PayPal Email Address ', 'gravityformspaypal' ),
'type' => 'text',
'class' => 'medium',
'required' => true,
'tooltip' => '

' . __( 'PayPal Email Address', 'gravityformspaypal' ) . '

' . __( 'Enter the PayPal email address where payment should be received.', 'gravityformspaypal' )
),
array(
'name' => 'mode',
'label' => __( 'Mode', 'gravityformspaypal' ),
'type' => 'radio',
'choices' => array(
array( 'id' => 'gf_paypal_mode_production', 'label' => __( 'Production', 'gravityformspaypal' ), 'value' => 'production' ),
array( 'id' => 'gf_paypal_mode_test', 'label' => __( 'Test', 'gravityformspaypal' ), 'value' => 'test' ),

),
'horizontal' => true,
'default_value' => 'production',
'tooltip' => '

' . __( 'Mode', 'gravityformspaypal' ) . '

' . __( 'Select Production to receive live payments. Select Test for testing purposes when using the PayPal development sandbox.', 'gravityformspaypal' )
),
);

$default_settings = $this->add_field_after( 'feedName', $fields, $default_settings );
return $default_settings;
}

The code above produces output similar to the following:

remove_field()
When extending the GFPaymentAddOn you may want to remove some of the default fields from your add-ons feed configuration page.
$this->remove_field( $name, $settings );

$name string
The name property of the field to be removed.

$settings array
The array of sections containing their current fields.

remove_field() Example
This example removes the Setup Fee field.
public function feed_settings_fields() {
$default_settings = parent::feed_settings_fields();
//hide default display of setup fee
$default_settings = $this->remove_field( 'setupFee', $default_settings );
return $default_settings;
}

replace_field()
Instead of removing a field, you may replace it with a modified version. When using replace_field, you do not need to worry about the placement on the page because the field will remain in the same location.
$this->replace_field( $name, $fields, $settings );

$name string
The name property of the field to be replaced.

$fields array
An array of fields to be inserted.

$settings array
The array of sections containing their current fields.

replace_field() Example 1 – Adding Donation to Transaction Type Drop Down
This example adds Donation as a choice in the Transaction Type drop down by replacing the transaction type field with an altered version of it. You could also achieve this by removing the field and adding a new version of it and placing it in the correct location on the page.
public function feed_settings_fields() {
$default_settings = parent::feed_settings_fields();

//--add donation to transaction type drop down
$transaction_type = $this->get_field( 'transactionType', $default_settings );
$choices = $transaction_type['choices'];
$add_donation = true;
foreach ( $choices as $choice ) {
//add donation option if it does not already exist
if ( $choice['value'] == 'donation' ) {
$add_donation = false;
}
}

if ( $add_donation ) {
//add donation transaction type
$choices[] = array( 'label' => __( 'Donations', 'gravityformspaypal' ), 'value' => 'donation' );
}
$transaction_type['choices'] = $choices;
default_settings = $this->replace_field( 'transactionType', $transaction_type, $default_settings );

return $default_settings;
}

replace_field() Example 2 – Adding First and Last Name to Billing Information for Mapping
public function feed_settings_fields() {
$default_settings = parent::feed_settings_fields();

//--get billing info section and add customer first/last name
$billing_info = $this->get_field( 'billingInformation', $default_settings );
$billing_fields = $billing_info['field_map'];
$add_first_name = true;
$add_last_name = true;
foreach ( $billing_fields as $mapping ) {
//add first/last name if it does not already exist in billing fields
if ( $mapping['name'] == 'firstName' ) {
$add_first_name = false;
} else if ( $mapping['name'] == 'lastName' ) {
$add_last_name = false;
}
}

if ( $add_last_name ) {
//add last name
array_unshift( $billing_info['field_map'], array( 'name' => 'lastName', 'label' => __( 'Last Name', 'gravityformspaypal' ), 'required' => false ) );
}
if ( $add_first_name ) {
array_unshift( $billing_info['field_map'], array( 'name' => 'firstName', 'label' => __( 'First Name', 'gravityformspaypal' ), 'required' => false ) );
}
$default_settings = $this->replace_field( 'billingInformation', $billing_info, $default_settings );
return $default_settings;
}

get_field()
$this->get_field( $name, $settings );

$name string
The name property of the field to be retrieved.

$settings array
The array of sections containing the current fields.

get_field() Example
See the replace_field() examples above.
settings_text()
Renders and initializes a text input based on the $field array.
protected function settings_text( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

settings_textarea()
Renders and initializes a textarea element based on the $field array.
protected function settings_textarea( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

settings_hidden()
Renders and initializes a hidden input based on the $field array.
protected function settings_hidden( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

settings_radio()
Renders and initializes one or more radio type inputs based on the $field array.
protected function settings_radio( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

choices_have_icon()
Determines if any of the choices for this field have an icon.
public function choices_have_icon( $choices = array() ) {}

$choices array
The array containing the field choices.

get_choice_attributes()
Parses the properties of the $choice array and returns a new array containing a set of HTML attributes to be added to the HTML element.
protected function get_choice_attributes( $choice, $field_attributes, $default_choice_attributes = array() ) {}

$choice array
The choice properties.

$field_attributes array
The fields attributes.

$default_choice_attributes array
The choices default attributes. Default is an empty array.

settings_checkbox()
Renders and initializes one or more checkbox type inputs based on the $field array.
protected function settings_checkbox( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

checkbox_item()
Returns the markup for an individual checkbox item for the given choice array.
protected function checkbox_item( $choice, $horizontal_class, $attributes, $value, $tooltip, $error_icon='' ) {}

$choice array
The array containing the choice properties.

$horizontal_class string
The CSS class to style the checkbox items horizontally.

$attributes string
The attributes to be added to the input element.

$value string
Indicates if the current choice is selected (1 if field has been checked. 0 or null otherwise).

$tooltip string
The tooltip for this choice.

checkbox_input()
Returns the markup for an individual checkbox input and label for the given choice array.
protected function checkbox_input( $choice, $attributes, $value, $tooltip ) {}

$choice array
The array containing the choice properties.

$attributes string
The attributes to be added to the input element.

$value string
Indicates if the current choice is selected (1 if field has been checked. 0 or null otherwise).

$tooltip string
The tooltip for this choice.

checkbox_input_{$choice_name}()
Define a custom checkbox_input_ function ending with a specific choice name to return a custom checkbox input and label markup for that choice.
public function checkbox_input_{$choice_name}( $choice, $attributes, $value, $tooltip ) {}

$choice array
The array containing the choice properties.

$attributes string
The attributes to be added to the input element.

$value string
Indicates if the current choice is selected (1 if field has been checked. 0 or null otherwise).

$tooltip string
The tooltip for this choice.

settings_select()
Renders and initializes a drop down field based on the $field array.
protected function settings_select( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

get_select_options()
Prepares an HTML string of options for a drop down field.
public function get_select_options( $choices, $selected_value ) {}

$choices array
The array containing the field choices.

$selected_value string
The value currently selected for the field.

get_select_option()
Prepares an HTML string for a single drop down field option.
public function get_select_option( $choice, $selected_value ) {}

$choice array
The array containing the choice properties.

$selected_value string
The value currently selected for the field.

settings_select_custom()
Renders and initializes a drop down field with a input field for custom input based on the $field array.
protected function settings_select_custom( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

settings_field_map()
Returns the field markup.
public function settings_field_map( $field, $echo = true ) {}

$field array
The array containing the parent fields properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

field_map_table_header()
Returns the thead element with the column headers.
public function field_map_table_header() {}

field_map_title()
Returns the title to be displayed in the left column of the table, the column containing the labels of the child fields. Defaults to Field; override this function to return a custom title.
protected function field_map_title() {}

get_mapped_field_name()
Returns the key for this field as used in the meta property of the Feed Object. e.g. contactStandardFields_first_name
public function get_mapped_field_name( $parent_field, $field_name ) {}

$parent_field array
The array containing the parent fields properties.

$field_name string
The name property of the field_map child field.

settings_field_map_select()
Returns the markup for the drop down containing the form fields and entry meta choices.
public function settings_field_map_select( $field, $form_id ) {}

$field array
The array containing the child field properties.

$form_id integer
The ID of the current form.

get_field_map_choices()
Returns an array of form field and entry meta choices.
public static function get_field_map_choices( $form_id, $field_type = null, $exclude_field_types = null ) {}

$form_id integer
The ID of the current form.

$field_type string|array
The type of fields to be included.

$exclude_field_types string|array
The type of fields to be excluded.

settings_field_select()
Renders a drop down field containing the form fields as choices.
protected function settings_field_select( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

get_form_fields_as_choices()
Retrieve an array of choices containing the form fields.
public function get_form_fields_as_choices( $form, $args = array() ) {}

$form Form Object
The current form.

$args array
Additional settings to check for (field and input types to include, callback for applicable input type).

settings_checkbox_and_select()
Renders and initializes a checkbox field that displays a select field when checked.
protected function settings_select( $field, $echo = true ) {}

$field array
The array containing the field properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

settings_dynamic_field_map()
Returns the field markup for the dynamic_field_map type field.
public function settings_dynamic_field_map( $field, $echo = true ) {}

$field array
The array containing the parent fields properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

settings_save()
Returns the markup for the save button.
public function settings_save( $field, $echo = true ) {}

$field array
The array containing the parent fields properties.

$echo boolean
Default is true. Indicates whether the field markup should be echoed to the page.

Gravity Forms Settings Page

Gravity Forms Settings Page

OverviewGeneral SettingsreCAPTCHA v2 SettingsreCaptcha API KeysSite Key and Secret KeyType

Overview

The Gravity Forms Settings panel within your WordPress admin area is where you can set a variety of plugin wide options. To navigate to the settings panel, hover over 「Forms」 in your WordPress admin sidebar, and choose 「Settings」. If you do not have a Forms panel in the sidebar, then you will need to install Gravity Forms first and make sure it has been activated via your WordPress admin Plugins settings.

General Settings

SettingDescriptionSupport License KeyEnter your support license key in this field. Your support license key is used to access automatic updates. The message Output Default CSSOutputs Gravity Forms default CSS. Disable this if you plan to create your own CSS.Default CurrencySelect the Currency setting for all forms on this website.LoggingEnable if you would like logging within Gravity Forms. Logging allows you to easily debug the inner workings of Gravity Forms to solve any possible issues.Toolbar MenuEnable to display the forms menu in the WordPress top toolbar. The forms menu will display the ten forms recently opened in the form editor.Automatic Background UpdatesEnabling this will allow Gravity Forms to automatically update in the background. It requires a valid license key.No Conflict ModeEnable to prevent extraneous scripts and styles from being printed on a Gravity Forms admin pages, reducing conflicts with other plugins and themes.Output HTML5Disable this option if you would like to prevent the plugin from outputting HTML5 form fields.

reCAPTCHA v2 Settings

Note that reCAPTCHA v2 settings (and the new reCAPTCHA v3 functionality) are now available with the dedicated Gravity Forms reCAPTCHA Add-On. Refer to that documentation here.

The Gravity Forms Captcha field integrates with reCAPTCHA version 2, a free Google service that helps protect your forms from spam bots. To use this service, you will need to setup your API keys and choose your type here.

reCaptcha API Keys

A matched pair containing a site key and a secret key are required to link the reCaptcha v2 service to your Gravity Forms site installation. You will need to sign up for a free account to get your keys. From there, you can generate one or more pairs of the type of reCaptcha keys you wish to implement.

IMPORTANT: Make sure to use the correct domain value during the key setup at your reCAPTCHA account. The value can』t contain the protocol prefix, it』s recommended to use just the domain without www. or anything. If your site URL is http://www.example.com we recommend you to use example.com
 
If you use an invalid domain value during the setup, the reCAPTCHA field will display an Invalid domain for site key error.

Site Key and Secret Key

Enter your key pair here.

Type

As of Gravity Forms v2.4.7, Gravity Forms』 Captcha field supports the reCaptcha types of v2 Checkbox and v2 Invisible.

The checkbox keys will only allow you to add a v2 checkbox on your form, while v2 Invisible keys will allow you to choose either v2 reCaptcha type. Note that this is a site wide setting, and as such, you cannot vary the reCaptcha type used from form to form on the same site.

Choose the reCaptcha v2 type you want, from the choices of Checkbox or Invisible. If your keys are compatible will see the reCaptcha box and be asked to complete it to finalize your setup.

If you enter a key pair for checkbox and try to select invisible reCaptcha, the Google service will return an error message within the reCaptcha frame.

An invisible key pair is valid for either type, working with v2 checkbox and v2 invisible.

Notification Settings

Notification Settings

NameEventSend ToEnter EmailSelect a FieldSend to FieldConfigure RoutingSend toIfComparisonValueFrom NameFrom EmailReply ToBCCSubjectMessageAttachmentsAuto-formattingConditional Logic

Within the Gravity Forms notification settings, there are various different options that can be configured. This article serves as a reference for the various settings available when configuring Gravity Forms notifications. For more of a walkthrough of setting up notifications, take a look at our article on configuring notifications in Gravity Forms.

Name

This setting is the name of your new notification. It is used for reference to make your notifications easier to identify within the Gravity Forms settings.

Event

This setting defines the event that will trigger the notification. Depending on your existing form settings, the following selections may be available:

EventDescriptionForm is submittedThis action is triggered when a form submission is completed.Form is savedThis action is triggered when a form is saved using the Save and Continue functionality. Only available if Save and Continue is enabled on the form.Save and continue email is requestedThis action is triggered when the form submitter requests an email containing their Save and Continue details. Only available if Save and Continue is enabled on the form.

Send To

This setting allows you to send the notification email to a specific recipient.

Enter Email

This field is used to define the email address that the notification will be sent to. This field supports static text as well as merge tags.

Select a Field

This setting allows you to send the notification to the value of a field submission.

Send to Field

This dropdown contains available fields in which the value will be used to send the notification. For example, if you have an email field within your form and want to send the notification to the email address submitted in that field, you would use this to select the desired email field.

Configure Routing

This setting allows you to configure conditional rules to determine where the notification will be sent.

Send to

This portion of the setting allows you to set the email address to send to if the condition is met. This option supports static text as well as merge tags.

If

Within these fields, you will configure the condition that would need to be met.

Within this dropdown, you will select the field to be used when checking the condition. For example, if you want to check to see if a specific radio button has been selected, you would set that radio button field within this dropdown.

Comparison

Here, you will define the method of comparison between the field and the value. The following operators are available:is; is not; greater than; less than; contains; starts with; ends with.

Value

This is the value that you would like to compare the field to.

From Name

This setting will set the name displayed to the recipient when receiving the notification. This option supports static text as well as merge tags.

From Email

This setting will determine which email will be listed as the sender within the notification.

Reply To

If replies should be sent to a different email than the one that the notification is sent from, you can define that email address here. This option supports static text as well as merge tags.

BCC

If additional recipients should be added to the notification via BCC, they can be added here. This option supports static text as well as merge tags.

Subject

This is the subject that will be shown to the recipient when receiving the notification. This option supports static text as well as merge tags.

Message

This is the message content that will be sent within the notification. This option supports static text as well as merge tags.

Attachments

This option appears when there are File Upload fields on the form. Check this box to include uploaded files when the notification is sent. This is available with Gravity Forms version 2.4.

Auto-formatting

By default, HTML line breaks will be automatically included within the message content. By enabling this setting, line breaks will not automatically be placed.

Conditional Logic

This setting enables conditional logic on the notification as a whole. For more information, visit our article on configuring conditional logic.