Sending Form Notifications Using Postmark

Sending Form Notifications Using Postmark

Pre-RequisitesConfiguring Notifications

A common issue that most WordPress users see is a failure to send emails from their site. This is usually caused by their web host blocking the emails or a shared IP on the web server being flagged for spam. By using the Postmark Add-On to send form notifications, that issue can be eliminated, since the notifications will be sent using a dedicated email service, rather than relying on the web server. Here』s how to set it up.

Pre-Requisites

Setup the Postmark Add-On

Configuring Notifications

Now that you』ve set up your initial settings within the Postmark Add-On, it』s time to configure your form notifications to send using Postmark.

Access an existing form notification or create a new notification by going to your form settings and clicking on Notifications.Under Email Service, select the Postmark option.When using Postmark, you』ll only be able to send from specific email addresses that are pre-configured within Postmark. Within the From Email dropdown, select the email address that you want to use as the sender for the notification.Continue setting up your notification. For more information, see our article on configuring notifications in Gravity Forms.Save your settings.

You』re all set! Your form notifications will now use Postmark to send the messages.

In addition to the standard functionality of sending notifications, you can also take advantage of Postmark』s additional features within the Postmark Add-On such as email tracking and statistics within your Postmark account. For more information, take a look at our article on email tracking in Postmark.

get_capabilities()

get_capabilities()

DescriptionUsageParametersExamplesSource Code

Description
The get_capabilities() function in the Add-On Framework retrieves all capabilities or a specific capability for the add-on.
Usage
$capabilities = get_capabilities( $capability );

Parameters

**$capability ** string
Capability to return.

Examples
This example retrieves the capability for 「gravityforms_mailchimp」
$capabilities = get_capabilities( 'gravityforms_mailchimp' );

Source Code
This function is located in the GFAddOn class in gravityforms/includes/addon/class-gf-addon.php

FreshBooks Change Log

FreshBooks Change Log

2.8 | 2021-05-072.7 | 2020-04-212.6 | 2019-08-072.5 | 2017-04-282.4 | 2016-12-062.3.1 | 2016-11-302.3 | 2016-08-312.2 | 2015-04-202.1 | 2015-02-262.0 | 2014-12-151.4.41.4.3 | 2013-06-211.4.2 | 2013-05-221.4.1 | 2013-05-221.4 | 2013-03-071.3 | 2012-06-271.2 | 2012-02-071.1 | 2010-12-151.0 | 2010-12-15

2.8 | 2021-05-07

Added a form settings menu icon for Gravity Forms 2.5.

2.7 | 2020-04-21

Added translations for Hebrew, Hindi, Japanese, and Turkish.
Fixed notices which occur with PHP 7.4 when the add-on settings are not configured.

2.6 | 2019-08-07

Added security enhancements.
Added License GPL to the plugin header.
Updated Plugin URI and Author URI to https in plugin header.
Fixed a PHP notice which would occur when sending a request to Freshbooks.
Removed temporary plugin page.

2.5 | 2017-04-28

Added security enhancements.
Added translations.

2.4 | 2016-12-06

Renamed to Freshbooks Classic.

2.3.1 | 2016-11-30

Fixed strings for translations.

2.3 | 2016-08-31

Added $feed as the fourth parameter of the gform_freshbooks_args_pre_create filter.
Added tax fields back in API code so the hook gform_freshbooks_args_pre_create can be used to pass tax names/percentages.
Fixed notices thrown in API code when tax fields do not exist.
Fixed an issue with the upgrade routine which caused it run even if a pre-framework version hadn't been installed.

2.2 | 2015-04-20

Fixed a low severity security vulnerability in the admin area which could be exploited by authenticated users with form administration permissions.

2.1 | 2015-02-26

Added option to mark invoice as Paid. Only available for Product and Services type payment feeds. When enabled and a compatible payment feed runs, if the payment is successfully completed, a payment will be created in Freshbooks, updating the invoice status to paid. sendByEmail will also be delayed until after the payment has been created.
Added note to entry upon successful invoice/estimate creation.
Added merge tag support to the client & invoice/estimate Notes.
Added the gform_freshbooks_args_pre_create filter so the invoice/estimate field values can be overridden.
add_filter( 'gform_freshbooks_args_pre_create', function ( $args, $form, $entry ) {
// do stuff with the $args
return $args;
}, 10, 3 );
Updated feed settings page so Client and Invoice/Estimate settings are organised into their own sections.
Updated gravityformsfreshbooks.pot.
Updated Organization so that it is not required when mapping fields (since Freshbooks does not require it).
Updated logging statements.

2.0 | 2014-12-15

Added validation to discount to make sure it is between 0 and 100 percent.
Added ability to have invoice automatically emailed to the client, instead of remaining in Draft status in FreshBooks.
Added text domain/path to header.
Updated PO Number to truncate at 25 characters because FreshBooks will not create an invoice/estimate if the value if more than 25 characters.
Updated "Update existing client" option to filter by email to improve performance.
Updated POT file.
Updated to send Item Name instead of Item ID when using Fixed Costs or Dynamic Fields. To continue sending the Item Id, use the hook:
add_filter( 'gform_freshbooks_send_item_id_for_fixed_dynamic', 'send_item_id' );
function send_item_id(){
return true;
}
Updated required version of Gravity Forms to 1.8.17.
Updated to not process entries marked as spam.
Updated to have the file class-gf-freshbooks.php and organized code into this file and freshbooks.php.
Integrated with Add-on Framework.

1.4.4

Fixed issue when returning more than 100 line items from Freshbooks.

1.4.3 | 2013-06-21

Increased line item page size.

1.4.2 | 2013-05-22

Fixed issue with pricing message being displayed even when pricing option isn't selected.

1.4.1 | 2013-05-22

Fixed issue with line item paging.
Fixed issue with default line item field mapping type.
Added hook to enable option for dynamic field mapping.
ex: add_filter("gform_freshbooks_enable_dynamic_field_mapping", __return_true);

1.4 | 2013-03-07

Updated AJAX URL to resolve conflict when site is running under SSL.
Fixed a notice message.

1.3 | 2012-06-27

Added new conditional logic options (greater than, less than, contains starts with, ends with) and support for other conditional fields.
Fixed notices.
Added support for logging.
Added support for Manage WP.

1.2 | 2012-02-07

Added support for pricing fields.
Fixed notices.
Fixed issue where RG_CURRENT_PAGE constant was not available when GF is deactivated.
Added "Cancel" button to Edit page.
Updated List page to display the correct message when user doesn't have any feeds configured.

1.1 | 2010-12-15

Fixed issue with automatic upgrade on WP 3.0.

1.0 | 2010-12-15

Fixed issue with export condition that was only accurate after save button was clicked.
Changed submit button label to "Save Feed" for new feeds and "Update Feed" for existing feeds.
Fixed issue with multiple feeds being created.

Sending Form Notifications Using SendGrid

Sending Form Notifications Using SendGrid

Pre-RequisitesConfiguring Notifications

In most cases, it』s best practice to use an email-specific service for sending emails from your WordPress site instead of relying on your web server. That』s where the SendGrid Add-On for Gravity Forms comes in. With the SendGrid Add-On, you』ll be able to easily send all of your form notifications directly through SendGrid with just a few clicks.

Pre-Requisites

Make sure you have completed the steps in this article to ensure you have setup the SendGrid Add-On.

Configuring Notifications

Now that you』ve set up your initial settings within the SendGrid Add-On, it』s time to configure your form notifications to send using SendGrid.

Access an existing form notification or create a new notification by going to your form settings and clicking on Notifications.Within your notification, you should see a setting labeled Email Service. Within this setting, select the SendGrid option.Continue setting up your notification like usual. For more information, see our article on configuring notifications in Gravity Forms.Save your settings.

That』s all there is to it! Your form notifications are now configured to use the SendGrid email service!

Obtaining Your Postmark API Keys

Obtaining Your Postmark API Keys

To use the Postmark Add-On, you』ll need to have your Postmark API keys. Postmark won』t know what account is yours without the appropriate API keys. In this article, we』ll show you how to get your Postmark API keys.

Log into your Postmark account.
Click on Account at the top of the page.
Under Account, click on the API Tokens tab.
You』ll need both an Account API token and Server API token. The Account API token is listed here, so take note of it.
To get your Server API token, start typing the name of your Postmark server in the right side search box labeled Search for server and click on the server when it appears. Then click the Get a server API token button.
A new page will load and you will be presented with your Server API token.

Now that you have your Account API and Server API tokens, you』re ready to continue setting up the Postmark Add-On or start sending form notifications using Postmark.

Freshbooks Feed Meta

Freshbooks Feed Meta

IntroductionUsagePropertiesInvoice/Estimate PropertiesFixed/Dynamic Line Items Properties

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

email string
The ID of the field containing the client』s email address.

updateClient boolean
Update an existing client if email addresses match.

firstName string
The ID of the field containing the client』s first name.

lastName string
The ID of the field containing the client』s last name.

organization string
The ID of the field containing the client』s organization.

address string
The ID of the field containing the client』s address.

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

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

notes string
The note which should be added to the client. Merge tags supported.

alsoCreate string
Should an invoice or estimate be created. Possible values: invoice, estimate or neither.

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.

Invoice/Estimate Properties

sendByEmail boolean
Should the invoice/estimate be automatically emailed to the client, instead of being left in Draft form.

createPayment boolean
Only applicable when creating an invoice and also using a payment add-on with a product transaction. Once the user has completed his/her payment transaction, a Freshbooks payment for the invoice amount will automatically be created, changing the invoice status to Paid.

poNumber string
The ID of the field containing the purchase order number.

discount integer
The discount percentage which should be applied to the total invoice/estimate cost.

lineItems string
Create one or more line item(s) for your invoice or estimate. Possible values: fixed, pricing or dynamic.

notes2 string
The note which should be added to the invoice or estimate. Merge tags supported.

terms string
The terms which should be added to the invoice or estimate.

Fixed/Dynamic Line Items Properties

item array
An indexed array containing the Freshbooks item ids for each line item.

description array
An indexed array containing the description for each line item.

cost array
An indexed array containing the cost for each line item. With lineItems set to dynamic this would contain a field ID instead.

quantity array
An indexed array containing the quantity for each line item. With lineItems set to dynamic this would contain a field ID instead.

Form Object

Form Object

IntroductionUsagePropertiesBasic PropertiesPost RelatedForm SubmissionAdvanced PropertiesForm JSON

Introduction
The Form object is the main object in Gravity Forms. It contains all properties of a particular form (i.e. form title, fields, notification, scheduling, etc…). This object is available to most of the Gravity Forms hooks.
It is formatted as an associative array (i.e. $form[『title』] retrieves the form title).
Usage
12$form['title']                  //returns the form title$form['fields'][0]['type'];     //returns the type of the first field of the form

Properties
Basic Properties

id integer
The form Id.

title string
The form title

description string
The form description

labelPlacement string
Determines if the field labels are displayed on top of the fields (top_label), besides the fields and aligned to the left (left_label) or besides the fields and aligned to the right (right_label)
Possible values: top_label, left_label, right_label

descriptionPlacement string
Determines if the field description is displayed above the field input (i.e. immediately after the field label) or below the field input.
Possible values: above, below
Note: This setting is only available when labelPlacement is set to 「top_label」. When labelPlacement is not 「top_label」, this setting will always be set to 「below」.

Field Object array
List of all fields that belong to the form

Post Related

useCurrentUserAsAuthor bool
For forms with Post fields, this determines if the post should be created using the current logged in user as the author. 1 to use the current user, 0 otherwise.

postAuthor integer
When useCurrentUserAsAuthor is set to 0, this property contains the user Id that will be used as the Post author.

postCategory integer
Form forms with Post fields, but without a Post Category field, this property determines the default category that the post will be associated with when created.

postContentTemplate string
Template to be used when creating the post content. Field variables (i.e. {Name:3} ) can be added to the template to insert user submitted values into the post content. Only applicable when postContentTemplateEnabled is true

postContentTemplateEnabled bool
Determines if the post template functionality is enabled. When enabled, the post content will be created based on the template specified by postContentTemplate.

postFormat string
For forms with Post fields, determines the format that the Post should be created with.
Possible values: Will vary depending on the formats supported by the current theme.

postStatus string
For forms with Post fields, determines the status that the Post should be created with.
Possible values: draft, pending, publish

postTitleTemplate string
Template to be used when creating the post title. Field variables (i.e. {Name:3} ) can be added to the template to insert user submitted values into the post title. Only applicable when postTitleTemplateEnabled is true

postTitleTemplateEnabled bool
Determines if the post title template functionality is enabled. When enabled, the post title will be created based on the template specified by postTitleTemplate.

Form Submission

confirmation array
Contains the form confirmation settings such as confirmation text or redirect URL

notifications Notifications Object
An associative array containing the properties for all the email notifications which exist for a form.

Advanced Properties

Button array
Contains the form button settings such as the button text or image button source.

cssClass string
Custom CSS class. This class will be added to the

tag.

enableAnimation bool
When enabled, conditional logic hide/show operation will be performed with a jQuery slide animation. Only applicable to forms with conditional logic.

enableHoneypot bool
Specifies if the form has the Honeypot spam-protection feature

limitEntries bool
Specifies if this form has a limit on the number of submissions. 1 if the form limits submissions, 0 otherwise.

limitEntriesCount integer
When limitEntries is set to 1, this property specifies the number of submissions allowed.

limitEntriesMessage string
Message that will be displayed when the maximum number of submissions have been reached

scheduleForm bool
Specifies if this form is scheduled to be displayed only during a certain configured date/time

scheduleStart string
Date in the format (mm/dd/yyyy) that the form will become active/visible

scheduleStartHour integer
Hour (1 to 12) that the form will become active/visible

scheduleStartMinute integer
Minute that the form will become active/visible

scheduleStartAmpm string
「am」 or 「pm」. Applies to scheduleStartHour

scheduleEnd string
Date in the format (mm/dd/yyyy) that the form will become inactive/hidden

scheduleEndHour integer
Hour (1 to 12) that the form will become inactive/hidden

scheduleEndMinute integer
Minute that the form will become inactive/hidden

scheduleEndAmpm string
「am」 or 「pm」. Applies to scheduleEndHour

scheduleMessage string
Message to be displayed when form is no longer available

schedulePendingMessage string
Message to be displayed when form is not yet available

Form JSON
This example shows how a form array would look when formatted as JSON for use by the Gravity Forms CLI Add-On.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071{    "title": "My test form",    "description": "",    "labelPlacement": "top_label",    "descriptionPlacement": "below",    "button": {        "type": "text",        "text": "Submit",        "imageUrl": ""    },    "fields": [{        "type": "text",        "label": "My New Label",        "defaultValue": "Just testing",        "id": "1",        "visibility": "visible",        "formId": "14",        "pageNumber": 1    }, {        "type": "select",        "label": "My Dropdown",        "choices": [{            "text": "Choice 1",            "value": "one"        }, {            "text": "Choice 2",            "value": "two"        }],        "id": "2",        "visibility": "visible",        "formId": "14",        "pageNumber": 1,        "isRequired": false    }],    "version": "2.3-rc-5",    "id": "14",    "useCurrentUserAsAuthor": true,    "postContentTemplateEnabled": false,    "postTitleTemplateEnabled": false,    "postTitleTemplate": "",    "postContentTemplate": "",    "lastPageButton": null,    "pagination": null,    "firstPageCssClass": null,    "is_active": "1",    "date_created": "2018-04-12 16:51:40",    "is_trash": "0",    "notifications": {        "5acf8e9cf2b40": {            "id": "5acf8e9cf2b40",            "to": "{admin_email}",            "name": "Admin Notification",            "event": "form_submission",            "toType": "email",            "subject": "New submission from {form_title}",            "message": "{all_fields}"        }    },    "confirmations": {        "5acf8e9cf310a": {            "id": "5acf8e9cf310a",            "name": "Default Confirmation",            "isDefault": true,            "type": "message",            "message": "Thanks for contacting us! We will get in touch with you shortly.",            "url": "",            "pageId": "",            "queryString": ""        }    }}

Setting Up the GetResponse Add-On

Setting Up the GetResponse Add-On

Pre-RequisitesGetting to your Settings PageSettingsAPI KeyAccount Type (version 1.2.1+)Next StepsAdd-on Framework HooksScreenshot

Pre-Requisites

Download and install the add-onA GetResponse account

Getting to your Settings Page

To access the add-on setting page you will need to be logged into your WordPress admin dashboard. On the left-side navigation menu, hover over Forms and click on Settings. From there, click the GetResponse tab.

Settings

Refer to screenshot at bottom.

API Key

Enter your GetResponse API Key. Your GetResponse API account information can be found by logging into your GetResponse account, going to the Integrations & API page, clicking on the API link from the left side menu, and accessing your API key information.

We support the newer v3 of the GetResponse API from add-on version 1.2.1. Earlier versions of the API are no longer supported.

Account Type (version 1.2.1+)

The GetResponse API v3 uses different endpoints for their MAX (360/Enterprise) plan. As such, you must specify the GetResponse plan you are using in order for us to direct API calls to the proper place. Choose MAX if you are on that plan, or Standard for all other plans.

When the MAX account type is selected additional settings will be displayed for the Domain (v1.2.1+) and Endpoint (v1.4.2+).

When you click Save Settings, you will be notified by a green check mark beside the API key box if all seems good. If you do not see a green check mark, double check your information and try again.

Next Steps

You will want to create a feed in order to begin sending information to your GetResponse account. Refer to this document for instructions.

Add-on Framework Hooks

Because the GetResponse 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 GetResponse.

Screenshot

Caption: GetResponse Add-On Settings as of version 1.2.1 and higher.???????????

gaddon_no_output_field_properties

gaddon_no_output_field_properties

DescriptionUsageParametersPlacementSource Code

Description
Some non-standard HTML properties are not output to the field HTML by default. This filter allows you to allow or deny specific properties to be added to the field HTML.
Usage
The following would apply to all forms.
1add_filter( 'gaddon_no_output_field_properties', 'your_function_name' );

Parameters

$properties array
Array of properties not allowed.

$field Form Object
The current field meta to be parsed.

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in class-gf-addon.php.

Form Settings

Form Settings

Getting ThereSettings AreaSettings Sections Form BasicsForm LayoutForm ButtonSave and ContinueRestrictionsForm OptionsSave Settings

Getting There

Every form has its own group of settings. You can navigate to the Form Settings page a few different ways:

From within the Form List view, hover over the form you want to review and then click or hover on the Settings link that appears below. From within the Form Editor for a particular form, hover or click on the Settings option in the top bar.

Settings Area

The Settings area contain access to the many form specific areas of your form. Form Settings is the top most option. Note that the content of this left hand menu may vary based on which add-ons you have installed.

An example of some options available in the Settings area.

Settings Sections

Each setting option within the Form Settings page is described below, categorized into the sections they appear in.

Note that you can get a quick tooltip about a form settings by hovering over the (?) 「what is this」 button on the settings page for a short tooltip.

Form Basics

These are the basic fields entered when you created your form.

TitleEnter the title of your form. This will be helpful when you need to find it in the forms list.

DescriptionEnter a description for your form. This may be used for user instructions.

Form Layout

Label PlacementThis defines where your field labels will appear, relative to the position of the input area of the field. Top aligned is above the field, left aligned is and right aligned to that respective side of the field.

Description PlacementSelect the description placement. Descriptions can be placed above the field inputs or below the field inputs. Only available when Label Placement is set to 「Top aligned」. This setting can be overridden by field specific settings.

Sub-Label PlacementDetermines the placement of the sub-label. This setting can be overridden by field specific settings.

Validation SummaryIf enabled, will show a summary that lists form validation errors at the top of the form when a user attempts a failed submission.

Required Field IndicatorDetermines how you wish to indicate a required field. Options include the text 「(required)」, an asterisk only, or a customer indicator where you can define the text to be displayed.

CSS Class NameEnter the CSS class name you would like to use in order to override the default styles for this form.

Form Button

This section defines the options available to manipulate the appearance of the button used to submit your form.

Input TypeSelect either:Text: type in what you would like to appear as the button text. Image: to use an image as the button, select Image and enter the full path to the image you would like to use.

Conditional LogicThis option allows you to create rules to dynamically display or hide the submit button based on values from a field. Refer to this article for more on conditional logic.

Note that hiding the submit button can cause usability issues, which can negatively affect the accessibility of your form.

Save and Continue

This checkbox allows you to enable a button in which the user can save their progress and continue at a later time. See this article more information on Save and Continue.

Restrictions

Limit number of entriesEnter a number in the input box below to limit the number of entries allowed for this form. The form will become inactive when that number is reached.

Schedule formSchedule a time period the form is active. Checking this option also provides additional inputs for the Start Date and Time and End Date and time for the form schedule, along with Pending Message and Expired Message to display when the form is waiting to be displayed and after it has expired.

Require user to be logged inCheck this option to require a user to be logged in to view this form.

Require login messageEnter a message to be displayed to users who are not logged in. Shortcodes and HTML are allowed in this message so you can use a shortcode to call another form.

Form Options

Enable anti-spam honeypotChecking this option will enable the honeypot spam protection technique, which is an alternative to the reCAPTCHA field. Once activated, the honeypot spam protection technique will function automatically and will not require any user interaction. Form submissions caught by the honeypot protection are not saved, but the form confirmation is processed as usual.

Enable Animated transitionsChecking this option will enable a sliding animation when displaying/hiding conditional logic fields. By default, the displaying/hiding of conditional logic fields has no animation; the fields are displayed/hidden instantly.

Enable legacy markupTurning this option on will revert to pre-2.5 markup for your form. This option is enabled by default for forms that existed prior to you upgrading to 2.5. This option is off for all new forms.

Save Settings

Don』t forget to click Save Settings once you are done to commit your form setting changes.