Triggering Webhooks on Form Submissions

Triggering Webhooks on Form Submissions

IntroductionConfiguring WebhooksSettingsNotes

Introduction

The Gravity Forms Webhooks Add-On enables you to make remote HTTP requests to external services when a form is submitted.

By utilizing webhooks, you can pass form data on to 3rd party services even when there is not an official add-on available for it.

If you would like an alternative with a little less webhook work, check out our Zapier Add-On, which allows you to utilize the thousands of integration Zapier can connect to.

Configuring Webhooks

Ensure you have installed and activated the Webhooks Add-On.

You configure the webhooks for a form using a feed. Go to Form Settings → Webhooks tab, and then click the Add New button to create a new feed that will send data to your service of choice, using a webhooks. Next, configure the request that is being made. This will vary based on the service that you』re making the request to. If you』re unsure of what settings to select here, you may want to contact the service that you』re trying to connect to.

Settings

SettingDescriptionNameEnter a name for your feed. This is never displayed and is only used for identification purposes. You can name this anything you want.Request URLEnter the URL this request should be sent to. This setting also supports Merge Tags. You can use the {admin_ajax_url} and {rest_api_url} merge tags when you will be performing local requests.Request MethodSelect the HTTP method which is to be used when performing a request. The supported methods are GET, POST, PUT, PATCH, and DELETE.Request FormatSelect the format for the webhook request. The supported formats are FORM and JSON.Request HeadersHere you can configure one or more HTTP headers to be sent with the request. See note 1. Request BodyHere is where you will define what data is sent with the request. You can select from the following options:All Fields: This will send the entire unformatted entry.Select Fields: This will display the Fields Values setting.Field ValuesOnly displayed when Request Body is set to Select Fields. This dynamic setting allows you to define the keys and values to be sent in the request body. See Note 2. Webhook ConditionLike other add-ons, conditional logic can be applied. To use conditional logic, select the Enable Condition checkbox and then configure the rules which should be met for this request to be sent.

Notes

The Content-Type header is automatically set to application/json during feed processing when the Request Format is set to JSON and the Request Method is set to POST or PUT.For the values, you can select from the form fields, entry meta, or Add Custom Value which will display a text input that supports Merge Tags.

Trello Feed Meta

Trello Feed Meta

IntroductionUsageProperties

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

board string
The Trello ID of the board the card will be added to.

list string
The Trello ID of the list the card will be added to.

cardName string
The name to be assigned to the card. Merge tags are supported.

cardDescription string
The description to be assigned to the card. Merge tags are supported.

cardDueDate string
The ID of the date field or a custom value. Possible values: The ID of a Date type field or gf_custom

cardDueDate_custom integer
The number of days after today, used when the value of cardDueDate is gf_custom.

cardLabels array
array(
'green' => true,
'red' => false,
'yellow' => false,
'purple' => false,
'orange' => false,
'blue' => false,
);

An associative array of labels with the color as the key to a boolean indicating if the label should be applied to the card.

cardMembers array
array(
'TRELLO_MEMBER_ID_HERE' => true,
);

An associative array with the member ID as the key to a boolean indicating if the member should be assigned to the card.

cardAttachments array
array(
'10' => true,
'11' => false,
);

An array of file upload fields. The field ID is the key with a boolean value indicating if the files for that field should be attached to the card.

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.

Trello Change Log

Trello Change Log

2.0 | 2021-07-071.4 | 2020-09-091.3 | 2020-05-051.21.11.0

2.0 | 2021-07-07

Updated authentication method for enhanced security. Important: Manual re-authentication in the add-on suggested.
Fixed an issue where the Add-on icon is missing on the Form Settings page for Gravity Forms 2.5.
Deprecated old authentication method. Authentication will continue to work until removed.

1.4 | 2020-09-09

Added support for Gravity Forms 2.5.

1.3 | 2020-05-05

Added security enhancements.
Added translations for Hebrew, Hindi, Japanese, and Turkish.
Updated Javascript files, stylesheets to use minified versions.
Updated labels to be stored by ID instead of by color.
Fixed error message for when a file cannot be attached to a card.
Fixed issue of wrong variable being used in upgrade function.

1.2

Fixed fatal error which could occur if no boards are returned when initializing the API.

1.1

Added support for delaying feed processing until payment by PayPal Standard is successfully completed.
Fixed an issue where a due date of Jan 1, 1970 was set on the card if the mapped date field was empty.

1.0

It's all new!

Trash

Trash

Unwanted entries are not deleted immediately. Instead, these entries are moved to the Trash. An entry can only be permanently deleted after it has been moved to the Trash.

See this article for information on trash and other actions you can perform on entries.

Important Note: When an entry is permanently deleted, all files associated with this entry will also be deleted.

Translating Gravity Forms (or an add-on) using Poedit

Translating Gravity Forms (or an add-on) using Poedit

Getting StartedCreating a New TranslationUpdating an Existing TranslationTranslate those StringsShare Your TranslationOverride bundled Translation

In this article, we explain how you can use Poedit, the Gettext translations editor, to create and update translations for Gravity Forms (or an add-on).
Getting Started

Download the latest build of Gravity Forms or the Add-On to be translated.

Extract the ZIP.

Visit https://poedit.net/ and download a copy of Poedit. Downloads are available for both Windows and OS X.

Install and open Poedit.

Creating a New Translation

On the Welcome to Poedit screen click the Create new translation button.

Select the .pot file in the languages directory of the plugin you extracted earlier then click Open.

Select the language of the translation.

See Translate those Strings

Save the new translation by going to File > Save. The language ISO code should already be populated. Prefix that with the plugin slug e.g. gravityformscapsulecrm. Choose where the file should be saved then click Save.

Updating an Existing Translation

Download the .po file for the translation being updated from the Translations page.

On the Welcome to Poedit screen click the Edit a translation button.

Select the .po file for the translation you want to edit then click Open.

To pull in any new strings which need translating, and remove any translations for strings which no longer exist in Gravity Forms (or add-on) go to Catalog > Update from POT file. Select the .pot file in the languages directory of the plugin you extracted earlier then click Open.

See Translate those Strings

Save the updated translation by going to File > Save.

Translate those Strings

On the editor screen you』ll be presented with a list of all the strings available for translating. Untranslated strings are shown in bold.
Select the string you want to translate from the list at the top and then enter your translation in the pane at the bottom.
Poedit may also offer translation suggestions in the pane on the right. Click on the translation to use it.
Translate as many or as few strings as you like.

Share Your Translation

To compile the translation MO file for use by Gravity Forms (or add-on) go to File > Compile to MO. Choose where the file should be saved then click Save.

Open a support ticket or use our Contact Us form and let us know you would like to contribute your translations. We』ll reply informing you how best to send them to us. Once we have your files we will get them included in the next plugin update and on the Translations page of the support site. We will also credit you in the change log and on the Translations page.

Override bundled Translation
If for any reason you want to override bundled translation for your language with your own customized translation file, just use a FTP client to copy your .mo file to your site /wp-content/languages/gravityforms/
This will make Gravity Forms to use your translation file as first option. If a string is not included in your translation file, it will use the translation from the bundled translation file.

Translating Gravity Forms (or an add-on) using Loco Translate

Translating Gravity Forms (or an add-on) using Loco Translate

Getting StartedCreating a New TranslationUpdating an Existing TranslationTranslate those StringsShare Your TranslationOverride bundled Translation

In this article, we explain how you can use the Loco Translate WordPress plugin to create and update translations for Gravity Forms (or an add-on). Loco also has an free online PO file editor but this article focuses on the WordPress plugin.
Getting Started

Loco Translate is available from the WordPress Plugin Directory and can be installed directly from the Plugins > Add New page of your WordPress Admin.

Once installed and activated you will find a new Loco Translate menu item has been added. Here you will find a list of all your installed themes and plugins, including their available translations.

Creating a New Translation

To add a translation for a new language click the New language link in the Translations (PO) column of the plugin you want to translate.

On the New PO file tab select the language from the drop down of common languages, or enter the language ISO code.

You may also be offered the ability to choose where the translation will be stored. To ensure your translation is not lost during updates we would recommend selecting the global languages directory.

Click the Start Translating button.

See Translate those Strings

Updating an Existing Translation

On the Loco Translate packages tab, in the Translations (PO) column, click on the translation you want to update.

To pull in any new strings which need translating, and remove any translations for strings which no longer exist in Gravity Forms (or add-on) click the Sync button in the editor toolbar.

See Translate those Strings

Translate those Strings

On the editor screen you』ll be presented with a list of all the strings available for translating. Untranslated strings are shown in bold blue.
Select the string you want to translate from the list at the top and then enter your translation in the pane at the bottom.
Translate as many or as few strings as you like.

The newly translated string will have a star icon to the left of the string indicating that the changes have yet to be saved.

To compile the translation MO file for use by Gravity Forms (or add-on) click the Save button in the toolbar above the list of strings.

Share Your Translation

On the Loco Translate editor screen download the translation PO and MO files by using the buttons in the toolbar.

Open a support ticket or use our Contact Us form and let us know you would like to contribute your translations. We』ll reply informing you how best to send them to us. Once we have your files we will get them included in the next plugin update and on the Translations page of the support site. We will also credit you in the change log and on the Translations page.

Override bundled Translation
If for any reason you want to override bundled translation for your language with your own customized translation file, just use a FTP client to copy your .mo file to your site /wp-content/languages/gravityforms/
This will make Gravity Forms to use your translation file as first option. If a string is not included in your translation file, it will use the translation from the bundled translation file.

Translating the Datepicker

Translating the Datepicker

This work around is only necessary for Gravity Forms versions 2.4 and prior. The datepicker translations are part of the standard translation package in Gravity Forms 2.5.
The Datepicker used by the Date field is powered by the jQuery UI Datepicker script which is bundled with WordPress, as such it won』t be translated by the translation files included with Gravity Forms.
To translate the Datepicker you will need to download the translation file for your desired language from the jQuery UI GitHub repository. Save the file to the /js/ directory of your active theme.
Next you would add the following code snippet to your theme functions.php file, updating datepicker-your-lang with the actual name of the translation file you downloaded.
1234567add_action( 'gform_enqueue_scripts', 'add_datepicker_regional', 11 );function add_datepicker_regional() {    if ( wp_script_is( 'gform_datepicker_init' ) ) {        wp_enqueue_script( 'datepicker-regional', get_stylesheet_directory_uri() . '/js/datepicker-your-lang.js', array( 'gform_datepicker_init' ), false, true );        remove_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );    }}

Total

Total

SummaryCommon SettingsMerge TagsUsageModifiers

Summary

The Total field specifies where the order total should be displayed in the form. As the user selects products and options, the total will automatically update. It is available under the Pricing Fields section within the form editor.

Total field as displayed in the Field Library

Total field as displayed in the Form Editor.

Common Settings

This field uses only common field settings for the General, 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.

Merge Tags

For more information on the use of merge tags, refer to these articles.

Usage

{Field Name:2:modifier}

Modifiers

ModifierDescription:priceUsed to denote that the amount displayed by the merge tag should be formatted as currency.

Total Field CSS Selectors

Total Field CSS Selectors

ContainerTotal Price

Container
example: total field container (div) – applies to all forms
body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_total {border: 1px solid red;}
example: total field container (div) – applies just to form ID #1
body #gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_total {border: 1px solid red;}
example: total field container (div) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
body #gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_total {border: 1px solid red;}
Total Price
example: total price (span) – applies to all forms
body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_total .ginput_total {color: red;}
example: total price (span) – applies just to form ID #1
body #gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_total .ginput_total {color: red;}
example: total price (span) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
body #gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_total .ginput_total {color: red;}

Time

Time

SummaryCommon SettingsGeneral SettingsAppearance SettingsMerge TagsUsageModifiers

Summary

The Time field allows users to submit a time as hours and minutes. This field automatically validates that the information entered was formatted correctly. It is available under the Advanced Fields section within the form editor.

Time field as displayed in the Field Library

Time field as displayed in the Form Editor.

Common Settings

This field uses only common field settings for the 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

SettingDescriptionTime FormatSelect the format you would like to use for the time field. Available options are 12 hour (i.e. 8:30 pm) and 24 hour (i.e. 20:30).Custom Sub-LabelEnter values in this setting to override the sub-label for each field.

Appearance Settings

SettingDescriptionSub-Label PlacementSimilar to the Description Placement option, but instead changes the sub-label placement.

Merge Tags

For more information on the use of merge tags, refer to these articles.

Usage

{Field Name:2}

Notes:

The first of these merge tag parameters is optional and is simply the field name for easier identification.The second parameter defines the field ID within the form. In the example above, it would be field ID 2.

Modifiers

This field does not have any modifiers.