Input Mask

Input Mask

Standard Input MasksCustom Input MasksAccepted Input Mask CharactersNotesExamples

Input Mask options are available under the General Settings panel, and only for the Single Line Text field and the Post Custom Field. They can provide more granular control over the permitted entry formats than the standard fields such as Phone Number or Address Postal Code.

Standard Input Masks

Standard input masks provide a variety of common United States input formats to choose from. The choices are offered as standard are listed below. In all cases, any non-numeric digits are auto-inserted (e.g. the spaces, parentheses, dashes, etc.)

Standard OptionPattern OfferedUS PhoneStandard US formatted phone number. (###) ###-####US Phone + ExtStandard US formatted phone number with business style extension of up to 5 digits. (###) ###-#### x#####DateUS style mm/dd/yyyy numeric date format. ##/##/####Tax IDUS style tax identification number.##-#######SSNUS style special security number.###-##-#####Zip CodeUS style zip code format#####Full Zip CodeUS style zip+4 format. #####-####

Custom Input Masks

Input masks provide a visual guide allowing users to more easily enter data in a specific format such as dates and phone numbers. The input mask in the image above allows the user to add two digits for the month, two digits for the day, and four digits for the year. No letters or any other characters will work, only numbers.

Accepted Input Mask Characters

The following symbols are accepted as placeholders in input masks and provide some basic pattern matching.

SymbolMeaning9Accepts any numeric characteraAccepts any alphabetic character (must be lower case)*Accepts any single alphanumeric character.?Indicates that all characters defined by the mask after the question mark are optional. any otherAll other characters are literal values and will be displayed as is.

Notes

A customer will only see underscores when they enter the field, which identifies the quantity of characters the field expects, but not their type. We recommend you provide additional visual help for complicated masks, such as a field description or a placeholder example. If the 「Enable password input」 advanced property is checked, it will override the input mask functionality.

Examples

Here are some sample masks, and what an accepted input would be.

Date mask: 99/99/9999 → would accept 05/21/2011 or 21/05/2011, but not 05/21/11 and not 5/21/2011Social security mask: 999-99-9999 → would accept 987-65-4329 but not 800-555-FORMCode mask: aaa 999 → would accept BIO 101 but not B1O 5F0Key mask: ***-***-*** → would accept a9a-f0c-28QUS Zipcode+4 mask: 99999?-9999 → would accept 23462 or 23462-4062

Importing a Form

Importing a Form

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

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

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

Legacy (Personal, Business, Developer) License FAQ

Legacy (Personal, Business, Developer) License FAQ

GeneralWhat is a legacy license?Can I keep my legacy license?Can I buy (or upgrade or downgrade to) a legacy license?RenewalsCan I use automatic renewals with my legacy license?Can I keep renewing my legacy license manually, not using automatic renewals?What happens if I do not renew my legacy license?Upgrading Legacy LicensesHow is my legacy upgrade price calculated?What happens when I upgrade?

General
What is a legacy license?
「Legacy license」 refers to the Gravity Forms license types we had in place prior to September 2017, called 「Personal」, 「Business」 and 「Developer」. These older license types are now referred to collectively as 「legacy licenses.」 Legacy licenses can be maintained and continued, but can no longer be purchased as a new sale or an upgrade.
Can I keep my legacy license?
Of course! Any legacy license you own is still fully functional and will work exactly as it does now, as long you keep it active. Additionally, the annual renewal price of an active license will not change for its lifetime, as long as you don』t let it expire. So you may continue to use your legacy licenses exactly as you have been if you stay up to date with your renewals.
Can I buy (or upgrade or downgrade to) a legacy license?
No. Legacy licenses are no longer offered for sale, so any purchases or upgrades will need to be to one of our new license types. Check them out on the Gravity Forms purchase page of 「Basic」, 「Pro」 and 「Elite」, which now include additional features.
Renewals
Can I use automatic renewals with my legacy license?
Yes. Whenever you renew a legacy license, you will be prompted to add a payment method to your account, and that license will be enrolled in automatic renewals. The renewal date and annual renewal amount for that license will not change, you just no longer have to remember to renew manually each year.
Can I keep renewing my legacy license manually, not using automatic renewals?
No. Our new payment processing system utilizes auto-renewal for all subscribed licenses. You can cancel an auto-renewal for any license following the instructions in this article, but not that you will no longer be able to renew or upgrade that license once automatic renewals are canceled.
What happens if I do not renew my legacy license?
If you fail to renew your legacy license on time, it will expire. You cannot renew, purchase again, upgrade or otherwise recover an expired legacy license.
Upgrading Legacy Licenses
Legacy licenses can be upgraded to a current license type of higher feature set. This means you can:

upgrade a Personal license to any new license type
upgrade a Business license to a new Pro or new Elite license.

When you upgrade, your license key will remain unchanged, so no change is necessary for any sites it is in use on.
Please note that:

you cannot upgrade a developer license, as this license offers the same benefits as the Elite license.
you cannot upgrade a legacy license to higher legacy license type. They are no longer offered for sale.

For instructions on upgrading, see this article.
How is my legacy upgrade price calculated?
When upgrading, you may be entitled to a discount, based on any unused term of your existing license, and the amount you paid for it in your most previous transaction, such as the last renewal or a previous upgrade. Any discounts will be identified in your Plan Summary on the pre-checkout page, right before you are asked to complete your purchase.
Upgrade discounts affect the initial purchase price of the new license type only, and do not apply to future renewals.
What happens when I upgrade?
When you upgrade, your license key does not change, but we do update the license type it represents. No changes are necessary to any websites you have the license key installed on.
When upgrading your license, your new license will have an annual renewal date equal to the same day you upgraded. So if your original license was set to renew on December 1st, but you went ahead and upgraded it on October 1st, then your new license will renew on October 1st of each subsequent year, until cancelled.

Installing a Gravity Forms Add-On

Installing a Gravity Forms Add-On

Installing Gravity Forms Add-Ons using the Add-On BrowserInstalling Gravity Forms Add-Ons using the WordPress dashboardInstalling Gravity Forms Add-Ons using FTPActivate the Add-On and Review the Settings

Installing Gravity Forms Add-Ons is as simple as installing Gravity Forms. The simplest method is using the Add-On browser. In this article, we will show you each of the possible methods that can be used for installation.
Installing Gravity Forms Add-Ons using the Add-On Browser

Log into your WordPress admin dashboard.
Hover over Forms and click on Add-Ons.
Here you will see a list of all available add-ons. To install one, simply click the Install button. Once the Install button is clicked, WordPress will handle the download and installation of the Gravity Forms Add-On. Be sure to click Activate Plugin to activate the add-on.

Installing Gravity Forms Add-Ons using the WordPress dashboard

Download the zip file for your desired add-on. Access the Gravity Forms Add-On download page, click the add-on that you want to install, and download the zip file for it.
Log into your WordPress admin dashboard.
Hover over Plugins on the left side admin menu and click on Add New.
At the top of this page, click on Upload Plugin. Then click on Choose file and locate the zip file containing the add-on. Click the Install Now button.
WordPress will automatically handle the unpacking and installation for your Gravity Forms add-on. Once complete, click on Activate Plugin to activate it.

Installing Gravity Forms Add-Ons using FTP

Download the add-on zip file from the Gravity Forms add-on download page and unpack it.
Once you have your add-on files unzipped, connect to your server over FTP and navigate to the wp_content/plugins folder and upload the add-on files that you have unpacked.
Once the files have been successfully uploaded to the server, log into your WordPress admin dashboard.
Click on Plugins from the left side navigation menu.
You should see an entry for the add-on that you have uploaded. Click Activate to activate it.

Activate the Add-On and Review the Settings
Now that you have successfully installed an add-on for Gravity Forms, don』t forget to go to your WordPress admin Plugins page and activate it. There may also be settings required to enable the add-on』s functionality. Further information on individual add-ons can be found in their respective articles under the Add-Ons document category.

Including Scripts and Styles when Using the Add-On Framework

Including Scripts and Styles when Using the Add-On Framework

IntroductionScriptsScripts ExampleStylesStyles ExampleEnqueue Conditions

Introduction
Scripts and styles can be included for an add-on by overriding the scripts() and styles() functions with structured arrays. All scripts and styles will be added automatically to the Gravity Forms no-conflict mode whitelist.
Scripts
The scripts() function must return an associative array with the following properties:

handle string
The script will be registered with WordPress using this handle.

src string
The URL of the script.

version string
The version number to be added to the query parameters for cache busting. Set to null to disable.

deps array
An array of handles for scripts which are required before this script is loaded.

in_footer boolean
Determines if the scripts will be enqueued in the footer.

callback array
Function that is called when the script is enqueued.

strings array
An array of strings that can be accessed in JavaScript through the global variable [script handle]_strings.

enqueue array
An array of conditions for loading the script. See Enqueue Conditions.

Important: When overriding this function, be sure to call parent::scripts() to ensure the base class scripts are enqueued.

Scripts Example
12345678910111213141516171819202122232425public function scripts() {    $scripts = array(        array(            'handle'    => 'my_script_js',            'src'       => $this->get_base_url() . '/js/my_script.js',            'version'   => $this->_version,            'deps'      => array( 'jquery' ),            'in_footer' => false,            'callback'  => array( $this, 'localize_scripts' ),            'strings'   => array(                'first'  => __( 'First Choice', 'simpleaddon' ),                'second' => __( 'Second Choice', 'simpleaddon' ),                'third'  => __( 'Third Choice', 'simpleaddon' )            ),            'enqueue'   => array(                array(                    'admin_page' => array( 'form_settings' ),                    'tab'        => 'simpleaddon'                )            )        ),    );     return array_merge( parent::scripts(), $scripts );}
Styles
The styles() function must return an associative array with the following properties:

handle string
The CSS file will be registered with WordPress using this handle.

src string
The URL of the CSS file.

version string
The version number to be added to the query parameters for cache busting. Set to null to disable.

deps array
An array of handles for scripts which are required before this script is loaded.

media string
The media for which this stylesheet has been defined.

enqueue array
An array of conditions for loading the css file. See Enqueue Conditions.

Important: When overriding this function, be sure to call parent::styles() to ensure the base class scripts are enqueued.

Styles Example
1234567891011121314public function styles() {    $styles = array(        array(            'handle'  => 'my_styles_css',            'src'     => $this->get_base_url() . '/css/my_styles.css',            'version' => $this->_version,            'enqueue' => array(                array( 'field_types' => array( 'poll' ) )            )        )    );     return array_merge( parent::styles(), $styles );}
Enqueue Conditions
Scripts and styles should always be loaded only when needed. The Add-On Framework provides a simple way to configure this for each of the JavaScript and CSS files. When overriding scripts() and styles() be sure to include the 「enqueue」 array with any or all of the following properties:

callback array
Function that is called to determine if the script or stylesheet can be enqueued.
Example:
1array( $this, 'requires_script' )

admin_page array
Specify one or more pages (known pages) where the script is supposed to be enqueued. When this setting is specified, scripts will only be enqueued in those pages. Possible values: form_editor, form_settings, plugin_settings, plugin_page, entry_view, entry_detail, results.
Example:
1array( 'admin_page' => array( 'form_settings', 'plugin_settings' ) )

tab array
Specifies a form settings or plugin settings tab in which the script is supposed to be enqueued. If none is specified, the script will be enqueued in all of the form settings or plugin_settings pages.
Example:
1array( 'tab' => 'signature' )

query string
Specifies a set of query string ($_GET) values. If all specified query string values match the current requested page, the script will be enqueued. Note that _empty_ and _notempty_ can be used as 「smart」 values.
Example:
1array( 'query' => 'page=gf_edit_forms&view=settings&id=_notempty_' )

post string
Specifies a set of post ($_POST) values. If all specified posted values match the current request, the script will be enqueued.
Example:
1array( 'post' => 'posted_field=val' )

field_types array
Specifies one or more field types that requires this script. The script will only be enqueued if the current form has a field of any of the specified field types. Only applies when a current form is available.
Example:
1array( 'field_types' => array( 'signature' ) )

Common Questions about Gravity Forms Licensing

Common Questions about Gravity Forms Licensing

License RenewalsHow do I renew my license?What happens if my license expires?Why won』t my credit card go through?License UpgradesLicense TransfersLicense Payments, Cancellations & RefundsHow do I update or change my payment method or my account profile details?License KeysHow do I find my license key(s)?How do I use my license key?Can I see which sites are associated with my license?Can I revoke access from a site?Can I restore a license that I revoked?Obtaining Another Copy Of Your Receipt

License Renewals
How do I renew my license?
See this article on renewals, or this article regarding cancelling automatic renewals.
What happens if my license expires?
See this article on expiring licenses.
Why won』t my credit card go through?
If you』re not able to renew your license due to a transaction error, please contact support and be sure to provide the complete error message.
License Upgrades
See this article, or this one for legacy licenses.
License Transfers
See this article on transferring your license to another account.
License Payments, Cancellations & Refunds
Refer to these articles for information on purchases, cancellations, and refunds.
How do I update or change my payment method or my account profile details?
Follow the instructions in this article on payment methods, or this one about profile changes.
License Keys
How do I find my license key(s)?
See this article on finding and entering your license.
How do I use my license key?
Refer to the entering your license article for details.
Can I see which sites are associated with my license?
This is available within the license section of your account. See this article.
Can I revoke access from a site?
Yes. See this article for more information.
Can I restore a license that I revoked?
Yes. See this article for more information.
Obtaining Another Copy Of Your Receipt
Refer to this article for instructions.

HTML

HTML

SummaryCommon SettingsGeneral SettingsMerge Tags

Summary

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

HTML field as displayed in the Field Library

HTML field as displayed in the Form Editor.

Common Settings

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

General Settings

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

Merge Tags

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

Invoice/Estimate Settings in the FreshBooks Add-On Feeds

Invoice/Estimate Settings in the FreshBooks Add-On Feeds

Invoice SendingPO NumbersDiscountsLine ItemsNotesTerms

Within the feed settings of the FreshBooks Add-On, you may have noticed that you are able to easily create invoices and estimates using your form submission data. In this article, we will show you how to do so.
Note: This article assumes you have selected Invoice or Estimate for the Also Create option in the FreshBooks Add-On settings. If you need help locating this option, take a look at the creating feeds for the FreshBooks Add-On article.
Invoice Sending
By default, the FreshBooks Add-On creates invoices/estimates as drafts and does not automatically send them. If you would like FreshbBooks to automatically send the invoice to the customer, select the option labeled Send Invoice/Estimate By Email.
PO Numbers
By default, the FreshBooks Add-On will not set a PO number. If you want to set a PO number, you can use the PO Number dropdown to select the field that will contain it.
Discounts
Discounts can be applied using the Discount option and are applied to all invoices/estimates created by this feed. Entering a number here will apply that percentage discount to the total invoice/estimate amount.
If you want to set a specific numerical amount to discount, consider using form calculations instead.
Line Items
Within the Line Items option, you can specifically set line items that you want to display within the invoice/estimate. By default, all product fields on the form will be used.
When selecting Fixed Costs and Quantities, additional settings will appear. Within these settings, you can select your products and provide custom data for them such as Description, Unit Cost, and Quantity.
Notes
If you want to set any notes for the invoice/estimate created in FreshBooks, you can use the Notes setting to do so. Inside the text box, you can enter the note that you want displayed, as well as use merge tags to generate dynamic content.
To review and insert available merge tags, you can use the icon to the right of the field.
Terms
If you have terms that apply to the generated invoice/estimate, you can enter them within the Terms setting. Note that this option only supports static content, so merge tags cannot be used here. If you want to set terms for different invoices/estimates, you may want to create multiple feeds and use conditional logic.

Including a New Field Using the Add-On Framework

Including a New Field Using the Add-On Framework

IntroductionGetting StartedDefine the Add-On classDefine the Field classDownload the Sample Add-On

Introduction
In this article we will show how you can use the Add-On Framework to include a new field type which extends the GF_Field class.
Getting Started
Create a file with your add-on slug as the filename, this file will contain your plugin headers, define the version number, and handle including the actual add-on after Gravity Forms has loaded.
Here is the content of our simplefieldaddon.php file, excluding the plugin headers.
123456789101112131415161718define( 'GF_SIMPLE_FIELD_ADDON_VERSION', '1.0' ); add_action( 'gform_loaded', array( 'GF_Simple_Field_AddOn_Bootstrap', 'load' ), 5 ); class GF_Simple_Field_AddOn_Bootstrap {     public static function load() {         if ( ! method_exists( 'GFForms', 'include_addon_framework' ) ) {            return;        }         require_once( 'class-gfsimplefieldaddon.php' );         GFAddOn::register( 'GFSimpleFieldAddOn' );    } }
Define the Add-On class

Create a second php file, in this case we have named it class-gfsimplefieldaddon.php.

In this file you would include the Add-On Framework files by calling the following:
1GFForms::include_addon_framework();

Inherit the Add-On Framework by creating a new class which extends GFAddOn:
1class GFSimpleFieldAddOn extends GFAddOn {}

Add the class variables to configure the add-on.
1234567protected $_version = GF_SIMPLE_FIELD_ADDON_VERSION;protected $_min_gravityforms_version = '1.9';protected $_slug = 'simplefieldaddon';protected $_path = 'simplefieldaddon/simplefieldaddon.php';protected $_full_path = __FILE__;protected $_title = 'Gravity Forms Simple Field Add-On';protected $_short_title = 'Simple Field Add-On';

Add support for getting an instance of the add-on.
When Gravity Forms is loading it initializes the add-ons, it does this by looping through each registered add-on and calling its get_instance function. Adding a get_instance function also helps other developers integrate with your add-on.
123456789private static $_instance = null; public static function get_instance() {    if ( self::$_instance == null ) {        self::$_instance = new self();    }     return self::$_instance;}

Include the new field.
To ensure that the new field is available when entry exports are performed we will include the file containing our fields class by overriding the pre_init() function.
1234567public function pre_init() {    parent::pre_init();     if ( $this->is_gravityforms_supported() && class_exists( 'GF_Field' ) ) {        require_once( 'includes/class-simple-gf-field.php' );    }}

Add any custom settings and tooltips required by the field.
New settings can be defined by using the gform_field_standard_settings, gform_field_appearance_settings, and gform_field_advanced_settings hooks.
Tooltips for those new settings can also be defined using the gform_tooltips filter.
As these hooks are only required in the admin we can include them by overriding the init_admin() function like so:
123456public function init_admin() {    parent::init_admin();     add_filter( 'gform_tooltips', array( $this, 'tooltips' ) );    add_action( 'gform_field_appearance_settings', array( $this, 'field_appearance_settings' ), 10, 2 );}
Define the tooltips function:
1234567public function tooltips( $tooltips ) {    $simple_tooltips = array(        'input_class_setting' => sprintf( '

%s

%s', esc_html__( 'Input CSS Classes', 'simplefieldaddon' ), esc_html__( 'The CSS Class names to be added to the field input.', 'simplefieldaddon' ) ),    );     return array_merge( $tooltips, $simple_tooltips );}
Define the field_appearance_settings function:
123456789101112131415public function field_appearance_settings( $position, $form_id ) {    // Add our custom setting just before the 'Custom CSS Class' setting.    if ( $position == 250 ) {        ?>        

  •                                 
  •           'advanced_fields',        'text'  => $this->get_form_editor_field_title(),    );}

    Review the GF_Field article to see the other methods you can override to define your new fields appearance and functionality.

    At the end of the file, after your fields class, register the new field with Gravity Forms:
    1GF_Fields::register( new Simple_GF_Field() );

    Download the Sample Add-On
    The sample add-on used in the examples above, including inline documentation, is available from here:
    https://github.com/richardW8k/simplefieldaddon

    HubSpot Change Log

    HubSpot Change Log

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

    1.7 | 2021-11-10

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

    1.6 | 2021-10-12

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

    1.5 | 2020-09-23

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

    1.4 | 2020-07-14

    Added security enhancements.

    1.3 | 2020-05-18

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

    1.2 | 2019-10-23

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

    1.1 | 2019-08-07

    Added security enhancements.

    1.0 | 2019-07-18

    All new!