Deprecation of the Gravity Forms Credit Card Field

Deprecation of the Gravity Forms Credit Card Field

NoticeDetailHow to Change Your Payment Collection MethodMore Help Needed?

Notice
The Gravity Forms Credit Card Field has been deprecated in the Stripe Add-On from version 3.4. Forms that are currently using this field will continue to work, however, it is not possible to add the field to new forms.
We recommend you migrate any solutions using this field so they use an alternative Stripe payment collection method.
Detail
This field displays inputs for the credit card details. Gravity Forms turns the field values into a token in the browser just before submission. It then passes the token along to Stripe』s servers for processing with a script that has been deprecated by Stripe. The last 4 digits of the card number are later stored in the entry details.
With this payment method, you (the website admin/owner) takes on the burden of the safe storage, handling and transmission of sensitive payment data. The Gravity Forms Credit Card field collection method is not SCA capable, and will complicate attempts to obtain PCI compliance.
This approach is considered the least secure option for Stripe Add-on payment collection, and is discouraged by Stripe.
Gravity Forms and Stripe recommend you migrate your solution away from the Gravity Forms Credit Card field to either of the other Stripe payment collection methods.
Deprecation will not affect existing forms already using this field.
How to Change Your Payment Collection Method
The payment option is contained within Stripe Add-On settings − refer to this article for details.
BE AWARE of the implications:
1. You are modifying a payment gateway. Test extensively! Try on a development sandbox first, or duplicate your form and test on a hidden page. Care is needed, and make sure you have a fallback plan. Nothing hurts more than a problem with the page that collects money!
1. Removing the credit card field will result in you losing any saved entry data already collected for that field. It holds only partial digits of the payment method, but be conscious of this.
1. If you choose to upgrade to Stripe Checkout, don』t forget to configure the Checkout options within your Stripe dashboard. This is handled outside of Gravity Forms.
More Help Needed?
If you have any additional questions, please contact our Support Team who will be happy to help.
List of relevant links:
Download official Stripe Add-On
Stripe Add-On Change Log
About Stripe Payment Collection methods
Support of SCA
About SCA
Stripe Security and PCI Compliance Validation

Setting Up the Stripe Add-On

Setting Up the Stripe Add-On

Pre-RequisitesStripe SettingsModeWebhooksPayment Collection (Stripe v2.6+)Notes

The Stripe settings layout was modified in Stripe Add-On version 2.8. For setting up older versions, refer to this article.

Pre-Requisites

Gravity Forms and Gravity Forms Stripe Add-On installedSSL Certificate Installed and ConfiguredA Stripe accountA Stripe account login with user role of 「owner」 or 「administrator」

Stripe Settings

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

Navigate to your Stripe Add-On Settings page:

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

Mode

Mode specifies the environment you want to connect your form submissions to. Choosing Live will connect you to the environment that initiates real transactions, while Test will run the form entry into your Stripe test environment for review, but no actual charging will occur.

For full instructions on how to connect to a live or test environment, review the process described in this help guide.

Webhooks

Log in here to access your Stripe Webhooks management page.

In Stripe, click the Add endpoint button at the top right above the list of webhooks.Note: There is a maximum limit of 16 webhook endpoints per Stripe account.

In the Endpoint URL field, paste the URL found under 「View Instructions」 on the Gravity Forms Stripe Settings page.Under Events to send, click receive all events from within the box Click the Add endpoint button to save the webhook.

Under Signing secret, click the 「Click to reveal」 button.Copy the signing secret and note the Mode (Test or Live) at the top of the screen.

Enter the Signing Secret from the Stripe Webhooks page into the Stripe settings. Use the Test Signing secret or Live Signing secret field as applicable.Check the I have enabled the Gravity Forms webhook URL in my Stripe account. box.Click Save Settings at the bottom of the page.

Payment Collection (Stripe v2.6+)

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

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

Once you have entered your Stripe settings, you』re ready to begin Setting Up a Stripe Compatible Form.

Notes

There is a maximum limit of 16 webhook endpoints per Stripe account.Stripe Checkout can only be tested/used on a public site. If your site is not public, you won』t be able to see the Stripe Checkout page.

Displaying Your Poll Results to Visitors

Displaying Your Poll Results to Visitors

IntroductionShow results after submissionShow results immediately Display a link to view resultsDo not show results

Introduction

This article shows the various options you have when it comes to showing poll results to your site visitors. In most cases, a Gravity Forms poll can display both poll questions and/or the poll voting results, dependent on configuration.

To view poll results as a site administrator in the back end, refer to this article.

Show results after submission

Showing the Poll question first, and then displaying the poll results after a user submits the poll is a standard behavior used on many websites.

For a Poll block, set Mode to poll.For the Poll shortcode, set the Mode parameter to poll.For the Poll widget, set Display Mode to poll.

Show results immediately

You can also choose to display the current poll results immediately on page load, skipping the display of the Poll form itself.

For a Poll block, set Mode to results.For the Poll shortcode, set the Mode parameter to results.For the Poll widget, set Display Mode to results.If in a place where you can use merge codes, you can use either of these merge tags.

Display a link to view results

To display a view results link at the bottom of the poll question, so a visitor can choose to view the results only if they wish, use the following settings:

For a Poll block, this is controlled by the setting Display Link to Results Below Form.For the Poll shortcode, set parameter show_results_link to true.For the Poll widget, this is controlled by the Display Mode setting.

Do not show results

In the specific case where you wish to show only the poll questions, and no poll results (or link to poll results) at all, use the Poll shortcode and set the parameters of display_results and show_results_link to false.

Deprecation of the Rocketgenius Namespace for Gravity Forms 2.5

Deprecation of the Rocketgenius Namespace for Gravity Forms 2.5

SummaryAffected AreasAdditional updatesMoving Forward

Summary

The top-level Rocketgenius namespace is being replaced with Gravity_Forms. These changes may break third party add-ons using the old namespace, even though they may have tested fine in previous beta releases of Gravity Forms 2.5

These namespaces were introduced in Gravity Forms 2.5, and none of them existed in any previous release of Gravity Forms. As such, this change has the potential to affect beta testers only.

Affected Areas

Add-ons which are extending any class which previously had a Rocketgenius namespace will need to update those class references to Gravity_Forms.

These include:

RocketgeniusGravity_FormsSettings is now Gravity_FormsGravity_FormsSettingsSettingsRocketgeniusGravity_FormsFields, are all now Gravity_FormsGravity_FormsFieldsRocketgeniusGravity_FormsTranslationsPress_Updater is now Gravity_FormsGravity_FormsTranslationsPress_Updater

Additionally, if developers solutions are requiring any of the class files referenced above in their own add-ons, they』ll need to update those references, as well.

Additional updates

Changing the fully-qualified namespace for the new Settings class from RocketgeniusGravity_Forms to Gravity_FormsGravity_FormsSettings, because the Settings class file is in the settings subdirectory (thus, it now has the same namespace as the adjacent Fields class in the same directory.Renaming class files for Checkbox_And_Select and Text_And_Select to class-checkbox-and-select.php and class-text-and-select.php, respectively.Renaming the class file for TranslationsPress_Updater from class-t15s-updater.php to class-translationspress-updater.php, and updating associated require statements for that class file.

Moving Forward

This namespace update reflects the newly established standard for current and future Gravity Forms product development. Our expectation is that these namespaces will not change again. Any new classes which get added to Gravity Forms core or official Gravity Forms add-ons, will include the Gravity_Forms top-level namespace only.

Downloading the Gravity Forms Plugin and Add-Ons

Downloading the Gravity Forms Plugin and Add-Ons

IntroductionDownload via the Gravity Forms WebsiteInstall via WordPress admin

Introduction

Which add-ons you will have access to is determined by the type of active Gravity Forms license you purchased. Refer to this page for a comparison.

Access to files and updates is available only to active Gravity Forms licenses. If you have multiple active licenses in your account, you will receive access to all the add-ons available to each of those license levels.

See this page for a list of add-ons and the license level they are available with.

Download via the Gravity Forms Website

From your Gravity Forms account dashboard, go to the Your Downloads section.

Locate Gravity Forms (core) in the list of downloads.Click on the Download link or icon to the right of the name.

NOTE: Files will download in the ZIP archive file format. Do not unzip it (or allow your browser to unzip it automatically). When you install it, you will upload it in the ZIP format. If your file was unzipped automatically on download, see this article for a possible solution.

Install via WordPress admin

Login to your WordPress site』s admin dashboard.Go to the admin area Forms > Add-Ons. From here you can install directly to your site any official Gravity Forms add-on that is permitted by your license level.

Image: Gravity Forms Add-Ons as seen within the WordPress admin area.

Does Gravity Forms Support HHVM?

Does Gravity Forms Support HHVM?

Correcting File Upload Errors

While Gravity Forms is not tested on HHVM, in many cases it will operate properly out of the box or with a few modifications. As HHVM does have some incompatibilities with standard PHP releases, issues can arise from time to time and not all of these can be addressed. In this article, we will list any workarounds that may be required when running Gravity Forms with HHVM.
Correcting File Upload Errors
The File Upload field may have issues in some HHVM setups due to how the WordPress wp_max_upload_size function retrieves the values of the PHP upload_max_filesize and post_max_size settings. To correct this, simply place the following in your theme』s functions.php file (or ideally within its own plugin):
add_filter( 'upload_size_limit', function() {
$u_bytes = wp_convert_hr_to_bytes( ini_get( 'hhvm.server.upload.upload_max_file_size' ) );
$p_bytes = wp_convert_hr_to_bytes( ini_get( 'hhvm.server.max_post_size' ) );

return min( $u_bytes, $p_bytes );
} );

CSS Visual Guide and Design Overview

CSS Visual Guide and Design Overview

Element Relationships (HTML and PNG)Element NamingConfigurable ClassesForm Wrapper ClassesTheme & Markup ClassesLabel Position ClassesField Size ClassesCustom ClassesCSS Ready ClassesCSS Targeting Examples

Element Relationships (HTML and PNG)

We』ve put together a visual guide to the Gravity Forms CSS hierarchy to illustrate the structure of a form and the CSS class relationship.

You can access it on a few formats here:

View Visual CSS Guide (HTML Version) | Download Guide (png)

Element Naming

Gravity Forms are structured so that every element can be targeted and manipulated via CSS. Most elements share reusable class names to affect styling, and many elements have unique ID』s that you can use to target specific elements within the form. By using CSS inheritance, you can effectively style every element in your form.

All element ID』s are based on the unique form ID and then a field ID.For example:

#gform_wrapper_xx where 「xx」 is the form ID, or#field_xx_yyy where 「xx」 is the form ID and 「yyy」 is the field ID.

Configurable Classes

Form Wrapper Classes

Theme & Markup Classes

There are 2 classes applied to the form wrapper based on whether or not legacy mode is enabled for a form. The class .gravity-theme is applied to all forms that do no have legacy mode enabled. The class .gform_legacy_markup_wrapper is applied to all forms that have legacy mode enabled.

Label Position Classes

There are 3 label classes that are applied to the form wrapper based on the individual form settings, .top_label, .left_label and .right_label.

Other elements change positions, widths, etc. based on inheritance from these label classes.

Field Size Classes

For many of the individual fields, there are classes of .small, .medium and .large which are defined in the form admin by changing the field size setting.

Custom Classes

Finally, for most of the fields, the user can define additional class names with the Custom CSS Class setting in order to apply additional custom styles or to target elements for other types of manipulation.

CSS Ready Classes

Using Ready Classes, you can easily create more advanced alternative layouts for the fields in your forms. Essentially, Ready Classes are class names that you can add to the parent element surrounding each field to take advantage of pre-defined styles included in the default form stylesheet.

Note that the column and inline ready classes were deprecated with the improvements made to the form editor in Gravity Forms 2.5.

CSS Targeting Examples

This article contains a few basic usage examples for targeting each element, one that would be generic for all forms and then one (or two) that would be specific to a unique form ID. If you』re styling a specific form, you would simply view your source, find the form ID and replace the ID in these examples with your own.

Credit Card Processing Error Messages

Credit Card Processing Error Messages

Authorize.NetPayPal Payments Pro

If there is an error processing a credit card, the third-party payment processor will return an error code indicating the issue. The following messages may be displayed.
Authorize.Net

This credit card has been declined by your bank. Please use another form of payment.
The credit card has expired.
The merchant does not accept this type of credit card.
The address provided does not match the billing address of the cardholder. Please verify the information and try again.
The transaction amount is greater than the maximum amount allowed.
There was an error processing your credit card. Please verify the information and try again.
NOTE: Only certain error codes are used by the plugin. If the error code returned is not used by the plugin, this error message is the default error message displayed. Further research will need to be done to figure out the exact issue. For those familiar with HTML, the error message from the processor is displayed as an HTML comment in the page source. Because the message is often cryptic, it is not displayed to the customer. If the Gravity Forms Logging Add-On is used and set to log all messages, this message will be available in the log as well.

PayPal Payments Pro

This credit card has been declined by your bank. Please use another form of payment.
The credit card has expired.
The merchant does not accept this type of credit card.
There was an error processing your credit card. Please verify the information and try again.
There was an error processing your request. Your credit card was not charged. Please try again.
NOTE: Only certain error codes are used by the plugin. If the error code returned is not used by the plugin, this error message is the default error message displayed. Further research will need to be done to figure out the exact issue. For those familiar with HTML, the error message from the processor is displayed as an HTML comment in the page source. Because the message is often cryptic, it is not displayed to the customer. For those familiar with HTML, the error message from the processor is displayed as an HTML comment in the page source. Because the message is often cryptic, it is not displayed to the customer.

Creating a Feed for the Mad Mimi Add-On

Creating a Feed for the Mad Mimi Add-On

SummaryCreate a FeedFeed Settings Screen

Summary
Before the Mad Mimi Add-On can be used with Gravity Forms, you will first need to create a feed. Your Mad Mimi Feeds allow you to integrate a form with your Mad Mimi account to feed user information in real time when a form is submitted. This allows you to automatically add subscribers to your Mad Mimi List when a form is submitted.
Create a Feed
To create a feed to Mad Mimi using the Mad Mimi 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 Mad Mimi.
Once within your desired form, hover over Settings and click on Mad Mimi.
Click Add New to create a new feed. You will be presented with the Mad Mimi feed settings screen.

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

A feed Name is required. It is only used for identification and will not be shown anywhere other than your feed listing.
Under Mad Mimi List, select your Mad Mimi contact list that you would like to add the subscriber to.
Map Fields: Map each of the contact list fields to the desired form field that will contain that information. You can create custom fields that will appear within your iContact admin by selecting Add Custom Field when mapping a field.
Conditional Logic: If unchecked, every successful form submission will be sent to Mad Mimi. If you wish to set specific conditions for sending form data to Mad Mimi, then check the 「Enable」 box and fill out your required criteria.
Click the Update Settings button to save your options.

Delete Entry Data after Submission

Delete Entry Data after Submission

By default, Gravity Forms was designed to record all data submitted to it, so there isn』t an override to stop Gravity Forms from storing entry data upon submission. The reason for this is the entry must be saved so the data is available when notifications are sent and feed based add-ons, like PayPal and User Registration, are processed.
That said, Gravity Forms 2.4 did introduce Personal Data Settings which include the ablity to enable automatic deletion of entries after a specified number of days.
Bear in mind when entries are deleted, files associated with the entry are also deleted. If you want to keep the files, use the gform_field_types_delete_files filter.
There are also a number of third-party add-ons which can be used to delete entries either as the form submission ends or at a scheduled date/time:

Gravity Flow
Entry Automation by ForGravity
Gravity Perks – Disable Entry Creation by Gravity Wiz
Gravity Forms Encrypted Fields by PluginOwl
Gravity Forms Utility by Gravity+
Wider Gravity Forms Stop Entries by Jonny Allbut

If you would prefer not to use one of the above solutions you can use custom code in the theme functions.php file or a custom functionality plugin that will wait until the data is recorded, and then go in and remove the entry that was just created. To do so, you would use the following code which works with Gravity Forms 1.8 and newer:
123456// Target submissions from form ID  1.// Change gform_after_submission_1 to reflect your target form ID, or use gform_after_submission to target all forms.add_action( 'gform_after_submission_1', 'remove_form_entry' );function remove_form_entry( $entry ) {    GFAPI::delete_entry( $entry['id'] );}
The following code is applicable to Gravity Forms 1.7 and earlier only.
123456789101112131415161718192021222324252627282930add_action('gform_after_submission_1', 'remove_form_entry', 10, 2);function remove_form_entry($entry, $form){    global $wpdb;     $lead_id = $entry['id'];    $lead_table = RGFormsModel::get_lead_table_name();    $lead_notes_table = RGFormsModel::get_lead_notes_table_name();    $lead_detail_table = RGFormsModel::get_lead_details_table_name();    $lead_detail_long_table = RGFormsModel::get_lead_details_long_table_name();     //Delete from detail long    $sql = $wpdb->prepare(" DELETE FROM $lead_detail_long_table                            WHERE lead_detail_id IN(                                SELECT id FROM $lead_detail_table WHERE lead_id=%d                            )", $lead_id);    $wpdb->query($sql);     //Delete from lead details    $sql = $wpdb->prepare("DELETE FROM $lead_detail_table WHERE lead_id=%d", $lead_id);    $wpdb->query($sql);     //Delete from lead notes    $sql = $wpdb->prepare("DELETE FROM $lead_notes_table WHERE lead_id=%d", $lead_id);    $wpdb->query($sql);     //Delete from lead    $sql = $wpdb->prepare("DELETE FROM $lead_table WHERE id=%d", $lead_id);    $wpdb->query($sql); }
The expected behavior would be that the entry would not exist in the Gravity Forms database tables after submission. If you are having issues with this script, please read up on our gform_after_submission hook.