Create Content Template

Create Content Template

Checking the Create Content Template option allows you to format and insert form fields as the content of the field. This option is available on the Post Title, Post Body, and Post Custom Field fields (only when Field Type is set to Single line text or Paragraph Text).

After checking to enable this option, a dropdown with a list of available form fields (and other form/user/date related options) will appear. Selecting a form field from this list will automatically insert a token into the content template textarea. This token will then be replaced with the submitted value for the specified field when the content template is processed.

Dynamic content is inserted using merge tags. Refer to the merge tag user guides for more information.

This is the Post Content Templatesettings for the Post Body.

This is the Post Content Templatesettings for the Post Title.

Create a Customer in Stripe without Capturing Payment

Create a Customer in Stripe without Capturing Payment

You can create a customer in your Stripe.com dashboard, including their payment details, without actually charging the customer. The method you use to do this will depend on which version of the Stripe add-on you are using:

IMPORTANT: The following requires our Stripe Add-On version 3.4 or newer.
Payment method must be set to Stripe Credit Card Field.

Go to Form Settings > Stripe > Add New.Give the new feed a name and for the transaction type select Product and Services.The payment amount can be set to either the form total or a product field, it doesn』t matter which as long as the amount is greater than zero and conforms to Stripe.com minimum amount requirements, the customer won』t actually be charged.Map the Stripe Receipt setting to the form field which contains the customers email address.Add the following code snippets as usual, replacing feed name goes here with the actual name of your feed.

add_filter( 'gform_stripe_customer_id', function ( $customer_id, $feed, $entry, $form ) {
gf_stripe()->log_debug( __METHOD__ . '(): running customer creation snippet.' );
if ( rgars( $feed, 'meta/transactionType' ) == 'product' && rgars( $feed, 'meta/feedName' ) == 'feed name goes here' ) {
gf_stripe()->log_debug( __METHOD__ . '(): Working for feed ' . rgars( $feed, 'meta/feedName' ) );
$customer_meta = array();

$email_field = rgars( $feed, 'meta/receipt_field' );
if ( ! empty( $email_field ) && strtolower( $email_field ) !== 'do not send receipt' ) {
$customer_meta['email'] = gf_stripe()->get_field_value( $form, $entry, $email_field );
}

$customer = gf_stripe()->create_customer( $customer_meta, $feed, $entry, $form );
gf_stripe()->log_debug( __METHOD__ . '(): Returning Customer ID ' . $customer->id );

return $customer->id;
}

return $customer_id;
}, 10, 4 );

add_filter( 'gform_stripe_charge_authorization_only', function ( $authorization_only, $feed ) {
if ( rgars( $feed, 'meta/feedName' ) == 'feed name goes here' ) {
gf_stripe()->log_debug( __METHOD__ . '(): Authorization only for feed ' . rgars( $feed, 'meta/feedName' ) );
return true;
}

return $authorization_only;
}, 10, 2 );

add_filter( 'gform_stripe_charge_pre_create', function( $charge_meta, $feed, $submission_data, $form, $entry ) {
if ( rgars( $feed, 'meta/feedName' ) == 'feed name goes here' ) {
gf_stripe()->log_debug( __METHOD__ . '(): Adding setup_future_usage for feed ' . rgars( $feed, 'meta/feedName' ) );
$charge_meta['setup_future_usage'] = 'off_session';
}

return $charge_meta;
}, 10, 5 );

When the form is submitted and passes validation the customer will be created in your Stripe account. A charge will also be created based on how the feed is configured but it will not be captured when the entry is saved.

Please note that Stripe will automatically expire the authorized charges if not captured within seven days.

Creating a Feed for the PayPal Payments Standard Add-On

Creating a Feed for the PayPal Payments Standard Add-On

SummaryCreate a FeedFeed Settings ScreenOther SettingsFeed Notifications Setup

Summary

Before the PayPal Payments Standard Add-On can be used with Gravity Forms, you will first need to create a feed. A feed simply allows form submission data to be sent to another source. In this instance, payment data being sent to PayPal.

Create a Feed

To create a feed to PayPal Payments Standard using the PayPal Payments Standard 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 PayPal Payments Standard.Once within your desired form, hover over Settings and click on PayPal Payments Standard.Click Add New to create a new feed. You will be presented with the PayPal Payments Standard feed settings screen.

Note: You can create multiple PayPal Payments Standard feeds for your form; however, you must configure conditional logic on them. The PayPal Payments Standard Add-On will only process one feed during submission; if conditional logic is not configured, it will use the first feed it finds.

Feed Settings Screen

The following fields are available within the settings screen. Refer to the settings screenshots below.

A feed Name is required. It is only used for identification and will not be shown anywhere other than your feed listing.In the PayPal Email Address field, enter the email address for the PayPal account that will be receiving payments.The Mode field determines if you want to receive live payments or are submitting them to PayPal in sandbox mode for testing. If you』re ready to take payments live, set this to Production. Otherwise, set it to Test.Select the Transaction Type. If you are selling a one-time physical or digital product, you will typically select the Product and Services option. If you are selling a recurring subscription or accepting donations, you will want to select the respective option.

After you have selected your desired option within the Transaction Type dropdown, you will see various other fields appear that are specific to the option you have selected, in addition to other options below it. For more information on the fields that are specific to your transaction type, you may review the following articles:

The PayPal Payments Standard Products and Services Transaction Type

The PayPal Payments Standard Subscription Transaction Type

The PayPal Payments Standard Donations Transaction Type

Other Settings

Under the Other Settings section, there are several other options that can be configured. These options are the same regardless of the transaction type you select.

Billing Information configures what billing information is sent to PayPal when processing a transaction. Map each of the billing fields to the desired form field that will contain that information.The Image URL option allows you to enter the URL of the image displayed as your logo in the upper left order of the PayPal checkout pages.The Cancel URL option lets you customize the URL that users will be sent to if they cancel their order within PayPal before completion.

Options: These checkboxes allow you to better control the information that is obtained from PayPal. If you do not need to pass the address on to PayPal, enable the checkbox labeled Do not prompt buyer to include a shipping address. The same applies for passing a note.Some users may see a deprecated section titled Notifications. This section is only visible if the feed were previously configured to control notifications this way. See the Notifications section below for details on how to control when notifications are sent based on Events.Conditional Logic: If unchecked, every successful form submission will be sent to PayPal. If you wish to set specific conditions for sending form data to PayPal, then check the 「Enable Condition」 box and fill out your required criteria.Click the Update Settings button to save your options.

Feed Notifications Setup

Controlling when notifications are sent used to be available in the Feed Setup. This has been removed and is now controlled from the Notification itself.

Click on the Notifications menu in the left navigation.

Hover over the name of the notification you wish to modify and click Edit, or create a new notification. An Event section with the actions available for sending notifications will display.

Expand the drop down for the Event section and select the Event for which you want a notification sent. If you need to send notifications for more than one event, simply create another notification.Fill out the rest of the notification and click Update Notification or Save Notification, depending on whether this is an existing or new notification.

Using Gravity Forms to Create New Sites Within Multisite

Using Gravity Forms to Create New Sites Within Multisite

IntroductionPre-RequisitesSteps

Introduction

When running a multisite network in WordPress, you may need to create new sites within your network straight from a registration form. The User Registration Add-On for Gravity Forms enables this fairly easily. Here, we will show you how.

Pre-Requisites

Installed the User Registration Add-On.created a form within Gravity Forms, This article also assumes that you have an existing understanding of using the User Registration add-on.

Steps

Navigate to your registration form.From the Settings menu, select User Registration.Create a new feed by clicking the Add New button.

On the settings page, after the Action and Gravity Form options are selected, you will see a heading labeled Network Options. Select the checkbox labeled Create new site when a user registers.Additional options will appear. These are the options that will be used to create the new site once the form is submitted. Map the form field for each of these options.

Once activated, this feed will create a new site within a multisite network within Gravity Forms.

If you would like more information on the User Registration Add-On, refer to the User Registration Add-On documentation category.

Create Post with Custom Taxonomy

Create Post with Custom Taxonomy

In this snippet, we will show you how to use the built-in Tags field to create a WordPress post using a non hierarchical custom taxonomy.
123456789101112131415161718192021add_filter( 'gform_post_data', 'replace_tags_with_custom_taxonomy', 10, 2 );function replace_tags_with_custom_taxonomy( $post_data, $form ) {       //only change post type on form id 5    if ( $form['id'] != 5 ) {       return $post_data;    }       //------------------------------------------------------------------------------------    // Replace my_taxonomy with your custom taxonomy name as defined in your register_taxonomy() function call    $custom_taxonomy = 'my_taxonomy';    //------------------------------------------------------------------------------------    // Getting tags    $tags = implode( ',', $post_data['tags_input'] );    // Array of taxonomy terms keyed by their taxonomy name.    $post_data['tax_input'] = array( $custom_taxonomy => $tags );    // Set default tags to empty.    $post_data['tags_input'] = null;    // Return modified post data with the custom taxonomy terms added.    return $post_data;}
IMPORTANT: wp_insert_post() WordPress core function, used to create the post, checks the user』s capabilities before adding custom taxonomies. Therefore the above snippet will work only if the user is logged in and have the capability defined in assign_terms of your custom taxonomy definition.
If you need to set the custom taxonomy for not logged visitors, then you would need to use gform_after_submission hook to get the post_id from the entry object and update the post terms using wp_set_object_terms WP core function.

Creating Tickets in WSDesk using the Webhooks Add-On

Creating Tickets in WSDesk using the Webhooks Add-On

IntroductionSetting Up the FormConfiguring the WebhookNameRequest URLRequest MethodRequest FormatRequest HeadersRequest BodyField ValuesWebhook ConditionAlternative Method

Introduction

Using the Gravity Forms Webhooks Add-On is the easiest way to send requests to the WSDesk API to create support tickets when a form is submitted.

Note: This article assumes you have installed and activated the Webhooks Add-On and the WSDesk plugin. If not, you will need to do so before any of the functionality in this article can be used.

Setting Up the Form

Set up your form with the following fields and their labels: Single Line Text – Event Title, Paragraph – Event Description, Checkboxes – Event Options, Date – Start Date and End Date, Time – Start Time and End Time.

For the Checkboxes field, set these as the choices: All Day, Hide From Event Listings, Sticky in Month View, Feature Event

For the Time fields set up the Conditional Logic to Show field if Event Options is not All Day.

Configuring the Webhook

To configure webhooks for a form go to your Form Settings and click on the Webhooks tab and then click the Add New button.

Next, you』ll need to configure the request that is being made.

Name

Enter a name for your feed. This is never displayed and is only used for identification purposes. You can name this anything you want.

Request URL

The WSDesk endpoint for creating tickets is your site』s own Admin Ajax URL. The easiest way to include this URL is to enter the {admin_ajax_url} merge tag. It will be replaced with the correct URL when the feed is processed.

Request Method

Select the POST choice as the request method.

Request Format

Select the FORM choice as the request format.

Request Headers

We won』t be configuring any request headers.

Request Body

Select the Select Fields choice.

Field Values

Configure rows for the following fields, selecting Add Custom Value when configuring their values. Click the add item icon (+) to add new rows.

KeyValueactionwsdesk_api_create_ticketapi_keyThe WSDesk API key from the WSDesk > Settings > General tab

Next, you would configure additionals rows for the ticket fields which you have configured in WSDesk.

Enter the ticket field key (e.g. request_email) in the key input. 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.

Webhook Condition

If ticket creation should be conditional based on the value of a form field, select the Enable Condition checkbox and then configure the rules which should be met for this request to be sent.

Alternative Method

If you don』t have an Elite or legacy Developer license and would prefer not to upgrade your existing license, you can still create tickets in WSDesk by using the gform_after_submission filter in your theme functions.php file or a custom functionality plugin.

See the How to use WSDesk create ticket API with third-party forms and plugins? article by WSDesk for more details.

Creating a Custom Dropbox App

Creating a Custom Dropbox App

IntroductionCreate an AppDropbox ConsoleConfigure the Add-On

Introduction

In this article, we explain how you can create your own custom Dropbox App for use with the Dropbox Add-on.

This is optional and not required to use our Dropbox add-on, unless you need to have access to the Dropbox Upload Field or being able to upload files outside of the default app folder created for the Dropbox Add-On within your Dropbox user account, we recommend using the default connect to Dropbox button.

Note: Due to recent changes to the Dropbox API, currently the add-on doesn』t support team level access.

Create an App

Visit the Dropbox App Console.Click the Create app button.Under Choose an API section, select Scoped Access.Under Choose the type of access you need, select Full Dropbox.Enter a name for your custom app.If you have a personal and a business account which are linked, you will be asked to select which account you want to own the app. Once you make a selection, you will be asked to sign in to that account.Click the Create app button. You will be redirected to the console for your app. Note the presence of your App key and App secret on this page (not pictured). You will need to enter these into Gravity Forms to connect this custom app once you have followed the remaining steps.Add the OAuth Redirect URI provided in the add-on settings page to your Dropbox app settings under the OAuth2 Redirect URIs section.If you will be using the Dropbox Upload Field, which uses the Dropbox file chooser feature, enter the site domain under the Chooser / Saver / Embedder domains and then click Add.Once you have entered the information above, scroll up and click on the Permissions tab. On the permissions tab, you will need to select the files.content.write and files.content.read permissions in order to allow Gravity Forms to read your Dropbox user directories and to write files to them upon form submission.Click the Submit button at the bottom of the page for the new Permissions to take effect.

Dropbox Console

Review this article for more information on the Dropbox App console.

Dropbox App – Create App Settings

Dropbox App – Console Settings

Configure the Add-On

In a different tab go to the Forms > Settings > Dropbox page of your sites WordPress admin. And use the data taken at step 7 of the Create an App instructions above to complete the below steps.Enter the App key taken from the Dropbox console for your app.Enter the App secret from the Dropbox console for your app.Press enter and a button will show. Click the Click here to connect to Dropbox button.

Creating a Feed for the Campaign Monitor Add-On

Creating a Feed for the Campaign Monitor Add-On

SummaryCreate a FeedFeed Settings Reference

Summary

Before the Campaign Monitor Add-On can be used with Gravity Forms, you will first need to create a feed. A feed simply allows form submission data to be sent to another source. In this instance, form data being sent to Campaign Monitor.

Create a Feed

To create a feed to Campaign Monitor using the Campaign Monitor 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 Campaign Monitor.Once within your desired form, hover over Settings and click on Campaign Monitor.Click Add New to create a new feed. You will be presented with the Campaign Monitor feed settings screen.

Feed Settings Reference

This table describes the feed settings options you will be offered for a Campaign Monitor feed.

SettingDescriptionImage KeyNameTo identify your feed when viewing the feed list page. Required1Contact ListSelect the Campaign Monitor contact list that this feed will use.2Map FieldsMap each of the contact list fields to the desired form field that will contain that information. Email field is required.3Conditional LogicIf unchecked, every successful form submission will be sent to Campaign Monitor. If you wish to set specific conditions for sending form data to Campaign Monitor, then check the 「Enable Condition」 box and fill out your required criteria.4ResubscribeWhen checked, a user that has become inactive or unsubscribed will be resubscribed to the list.5

Creating a Feed for the 2Checkout Add-On

Creating a Feed for the 2Checkout Add-On

SummaryRequired FieldsCreate a FeedFeed Settings ScreenSubscription SettingsViewing Sales Results

Summary
Before the 2Checkout Add-On can be used with Gravity Forms, you will first need to create a feed. A feed allows form submission data to be sent to another source. In this instance, payment data being sent to 2Checkout.

Note: To use the 2Checkout Add-On, you will need a 2Checkout Field within your form. When using Page fields to create a multi-page form, the 2Checkout Credit Card field should be located on the last page of the form.

Required Fields
To create a feed for 2Checkout, you must have the following fields on your form:

Product Field and/or Total Field
2Checkout Field (only available when you have the 2Checkout Add-On active)

Create a Feed
To create a feed to 2Checkout using the 2Checkout 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 2Checkout.
Once within your desired form, hover over Settings and click on 2Checkout.
Click Add New to create a new feed. You will be presented with the 2Checkout Feed Settings screen.

Feed Settings Screen
The following fields are available within the settings screen.

A feed Name is required. It is only used for identification and will not be shown anywhere other than your feed listing.
Choose the Transaction Type. Most users will select Products and Services, but there is also the Subscription transaction type if you will be taking recurring payments.
Based on your selection within the Transaction Type drop down, additional settings will be available. This will either be the Products and Services Settings or Subscription Settings. Within both options, you will select the field that contains your form total, but if you have selected the Subscription option, you will also see additional options to control the subscription. See the section on Subscription Settings Below.
Configure the Billing Information. Map each of the various options to the desired form field that will contain that information.
Conditional Logic: If unchecked, every successful form submission will be sent to 2Checkout. If you wish to set specific conditions for sending form data to 2Checkout, then check the 「Enable Condition」 box and fill out your required criteria.
Click the Update Settings button to save your options.

Subscription Settings
The following fields are available when selecting Subscription transaction type.

Subscription Name: Enter a name for the subscription. It will be displayed on the 2Checkout dashboard as the name for the subscription. If left blank, the Feed Name will be used instead.
Recurring Amount: Select which field determines the recurring payment amount, or select 『Form Total』 to use the total of all pricing fields as the recurring amount.
Billing Cycle: Select your billing cycle. This determines how often the recurring payment should occur. The first drop down defines the numeric frequency from 1-12 and the second allows you to select Week(s), Month(s) or Year(s).
Recurring Times: Select how many times the recurring payment should be made. The default is to bill the customer until the subscription is cancelled.

Note: You can create multiple 2Checkout feeds for your form; however, you must configure conditional logic on them. The 2Checkout Add-On will only process one feed during submission; if conditional logic is not configured, it will use the first feed it finds.
Viewing Sales Results
After creating a feed and making your first sale, you can view the results on the Sales Results page.  Review Viewing Sales Results article for more information.

Creating a Feed for the ActiveCampaign Add-On

Creating a Feed for the ActiveCampaign Add-On

SummaryCreate a FeedFeed Settings Reference

Summary

Before the ActiveCampaign Add-On can be used with Gravity Forms, you will first need to create a feed. Your ActiveCampaign feeds allow you to integrate a form with your ActiveCampaign account to feed user information in real-time when a form is submitted. This allows you to automatically add subscribers to your ActiveCampaign list when a form is submitted.

Create a Feed

To create a feed to ActiveCampaign using the ActiveCampaign 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 ActiveCampaign.Once within your desired form, hover over Settings and click on ActiveCampaign.Click Add New to create a new feed. You will be presented with the ActiveCampaign feed settings screen.

Feed Settings Reference

This table describes the feed settings options you will be offered for an ActiveCampaign feed.

SettingDescriptionImage KeyNameTo identify your feed when viewing the feed list page. Required1ListSelect the list you would like to add the subscriber to. Required2Map FieldsMap ActiveCampaign fields to the form field that will send that information. Email field is required. If you need to add a custom field, select 「Add Custom Field」 in the dropdown and type the field name.3TagsDefine the tags for the new addition to ActiveCampaign. Either enter them in the Tags field or use merge tags to dynamically generate them based on the form submission.4NoteAssign a note to the user using text and merge tags.5Double Opt-In FormSelect which ActiveCampaign form will be used when exporting to ActiveCampaign to send the opt-in email.6Conditional LogicIf unchecked, every successful form submission will be sent to ActiveCampaign. If you wish to set specific conditions for sending form data to ActiveCampaign, then check the 「Enable Condition」 box and fill out your required criteria.7OptionsEnable Instant Responders if you want the user to receive the Instant Responder setup for the selected ActiveCampaign List upon signup. Enable Send the last broadcast campaign if you want the user to receive the last campaign sent out to the selected ActiveCampaign List.8