Most of the time, you』ll want to hide the form title from the shortcode, but if you』re somehow not able to do so, here』s how you can hide the form title using a bit of CSS.
123body .gform_wrapper h3.gform_title { display: none !important;}
Find more CSS examples in our extensive Design and Layout section, and review the Where To Put Your Custom CSS article for advice on placement.
Author 詩語
How To Install Gravity Forms
Using the WordPress dashboardUsing FTP
Installing Gravity Forms is quite simple and is the same process as installing many other plugins. In this article, we will show you how to quickly install Gravity Forms using the plugin uploader inside your WordPress admin dashboard.
If your site is hosted by WordPress.com you can only install Gravity Forms if you are on their Business plan, with a custom domain configured, and have installed the Hello Dolly plugin. You can then install Gravity Forms from the /wp-admin/ dashboard using the instructions below.
Using the WordPress dashboard
After downloading Gravity Forms go to the plugins page then click Add New.Click Upload Now in the top left corner.Drag and drop the file you downloaded onto the Choose File button.Follow the remaining prompts and Gravity Forms will be succesfully downloaded!
Using FTP
First, download Gravity Forms. To do so, simply access the Gravity Forms download page, log into your account, and download the plugin zip file.As you are installing via FTP, you will need to unpack the zip file that you downloaded.Next, access your WordPress site via FTP and navigate to the wp_content/plugins directory. Inside there, upload the entire 『gravityforms』 folder that you have obtained as result of unzipping the zip file.Once fully uploaded, access your WordPress admin dashboard and click on Plugins. Inside this page, you should now see an entry for Gravity Forms. All you have to do now is activate it by clicking one Activate Plugin.
That』s it! Gravity Forms is now installed and running on your WordPress site. To get started, you may now follow our guide on setting up Gravity Forms.
Holding Notifications until after Payment
Payment Completed Event NotificationSupported Add-OnsOther Gravity Forms Notification Events
This article explains how to send notifications after the payment has been completed when using payment add-ons.
Payment Completed Event Notification
The Payment Completed notification event will send the notification when a payment has successfully been completed. This is not to be confused with the Subscription Created event which will occur when a new subscription is created.
In order to enable this notification event, perform the steps below. This article assumes you have already created a form and the associated feed to the payment service.
From the left hand navigation menu, hover over Forms and then click on Forms.Select your form from the Forms list.Hover over Settings and click on Notifications.
From the Notifications list page, click Edit to edit the existing admin notification, or click Add New to create a new notification.
On the Notification page, select Payment Completed from the Event drop down. This will send the notification when a payment has successfully been completed.
Click the Update Notification button to save your changes.
Supported Add-Ons
The Payment Completed notification event is available in the following add-ons:
PayPal Standard Add-OnPayPal Payments Pro Add-OnStripe Add-OnAuthorize.Net Add-On
Other Gravity Forms Notification Events
For more information on the different notification events that are available within Gravity Forms as well as additional add-ons, please refer to this article.
Highlighting the Current or Future Date in the Datepicker
If you need to highlight a current or future date within the datepicker, here』s a code snippet to do it.
Note: You』ll need to replace #input_1_20 with a selector for your field.
1234567891011121314
How to Manually Update Gravity Forms
Using the WordPress Admin DashboardUsing the WP-CLI
WARNING: Do NOT use the Uninstall [plugin] button in the Forms > Settings area – this will remove your form data.
When you follow the steps below, all your data (forms, entries, feeds, settings etc.) will remain untouched. But we still recommend you back up your database and files before installing or updating any plugin.
Using the WordPress Admin Dashboard
If you haven』t already done so, download the Gravity Forms or Add-On zip from the downloads page. Be sure to save this zip file somewhere easily accessible as you will need it soon.From within your WordPress admin dashboard, hover over Plugins on the left side navigation menu and click on Add New.Click the Upload Plugin button.Click the Browse button.Navigate to the zip file you previously downloaded and select it.Once the file is selected, click the Install Now button.On the Installing plugin from uploaded file page click the Replace current with uploaded button.
For older WordPress versions prior to 5.5, try this guide.
Using the WP-CLI
If your webhost supports WP-CLI you can update Gravity Forms and the Add-Ons from the command line. Don』t already have the Gravity Forms CLI add-on installed? Install it today using the following WP CLI command: wp plugin install gravityformscli --activate
See the Managing Gravity Forms and Add-Ons with WP-CLI article for more details.
How to Add a New Field to an Existing Form Using the GFAPI
Get the existing form.Determine the new field』s ID.Create a new field object.Set new field』s properties.Add the new field to the form object.Save the modified form object.
Get the existing form.
12// Replace "123" with your existing form ID.$form = GFAPI::get_form( 123 );
Determine the new field』s ID.
If only one new field is being added AND the Gravity Forms version being used is at least 2.4.7, the easiest way to get the next field ID is as follows:
123//works if only one field being added//must have at least Gravity Forms version 2.4.7$new_field_id = GFFormsModel::get_next_field_id( $form['fields'] );
Otherwise, use this method:
Loop through the existing form fields to get the highest existing field ID. Increase that number by one to get the next available field ID.
1234567$new_field_id = 0;foreach( $form['fields'] as $field ) { if( $field->id > $new_field_id ) { $new_field_id = $field->id; }}$new_field_id++;
Create a new field object.
12345//create an array of field properties, this example creates a text field//pass array to the create method$properties['type'] = 'text'; $field = GF_Fields::create( $properties );
Set new field』s properties.
If only adding one new field, the properties may be set along with the type property set when calling GF_Fields::create() in the step above:
12$properties['id'] = $new_field_id;$properties['label'] = 'My Field';
Othewise, follow this step.
Set the field』s id property to the $new_field_id variable. Set the field』s label property as desired. Set any other desired field properties here.
12$field->id = $new_field_id;$field->label = 'My New Field';
Add the new field to the form object.
1$form['fields'][] = $field;
Save the modified form object.
1GFAPI::update_form( $form );
gform_zohocrm_record
DescriptionUsageParametersExamplePlacementSource Code
Description
This filter can be used to modify the record arguments before they are sent to Zoho CRM.
Usage
The following would apply to all feeds:
add_filter( 'gform_zohocrm_record', 'your_function_name', 10, 4 );
To target feeds for a specific form append the form id to the filter name. (format: gform_zohocrm_record_FORMID)
add_filter( 'gform_zohocrm_record_4', 'your_function_name', 10, 4 );
Parameters
$record array
The record argument.
$module string
The module.
$feed Feed Object
The feed currently being processed.
$entry Entry Object
The entry currently being processed.
$form Form Object
The form currently being processed.
Example
This example shows how you can modify the record to set the Lead Assignment Rules ID (lar_id) for an entry before it is sent to Zoho CRM. You need to update the snippet with your form id number, feed name, and value for lar_id. Please read the snippet comments.
// Change 33 to the id number of your form.
add_filter( 'gform_zohocrm_record_33', 'my_gform_zohocrm_record', 10, 5 );
function my_gform_zohocrm_record( $record, $module, $feed, $entry, $form ) {
$feed_name = rgars( $feed, 'meta/feedName' );
// Change Your Feed Name Here to the name of the Zoho CRM feed.
if ( $module === 'Leads' && $feed_name === 'Your Feed Name Here' ) {
// Change to use your own lar_id.
$record = array_merge( array( 'lar_id' => '123213' ), $record );
}
return $record;
}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
$filtered_record = gf_apply_filters( array( 'gform_zohocrm_record', $record['form']['id'] ), $record, $module, $record['feed'], $record['entry'], $record['form'] );
This filter is located in GF_ZohoCRM_API::insert_record() in class-gf-zohocrm-api.php.
Gravity Forms and PHP 8.0 Compatibility
CompatibilityReporting IssuesKnown IssuesUpdates
Compatibility
PHP 8.0 is a major new release of the PHP language with many changes.
WordPress is working towards full compatibility with PHP 8.0, but has ascertained a 「beta-compatible」 status. With that, the Gravity Forms product team are also working on compatiblity tests and fixes for any issues found.
At this point, we do not consider Gravity Forms to be proven compatible, and are working towards discovering and resolving issues across all our core and add-on products.
Reporting Issues
If you think you have discovered a PHP 8 related issue with a Gravity Forms product in your own testing, please let us know by contacting Support. Thank you for contributing!
Known Issues
The following issues are known to the team:
version_compare() fatal error in gravityforms.php – Fixed in 2.4.23.Unknown named parameter fatal error in class-gf-addon.php when enqueueing scripts – Fixed in 2.4.23.Multiple 「required parameters following optional parameter」 deprecation notices in Gravity Forms core and add-ons. – Fixed in 2.5 and various add-on updatesusort() returning bool from comparison function is deprecated notice in form_list.php – Fixed in 2.4.23.
Updates
This article will be updated to show the status of known issues, compatibility testing, and to identify expected releases for fixes.
gform_zohocrm_contact
DescriptionUsageParametersExamplesChange Email Opt OutPlacementSource Code
Description
This filter can be used to modify the contact arguments before they are sent to Zoho CRM.
Usage
The following would apply to all feeds:
1add_filter( 'gform_zohocrm_contact', 'your_function_name', 10, 4 );
To target feeds for a specific form append the form id to the hook name. (format: gform_zohocrm_contact_FORMID)
1add_filter( 'gform_zohocrm_contact_4', 'your_function_name', 10, 4 );
Parameters
$contact array
The contact arguments are an associative array.
1234567891011array( 'Email Opt Out' => 'false', 'Description' => 'some text', 'Lead Source' => 'Advertisement', 'SMOWNERID' => 'The-Zoho-CRM-User-ID-Here', 'options' => array( 'duplicateCheck' => '1', 'isApproval' => 'false', 'wfTrigger' => 'false' ),)
$feed Feed Object
The feed currently being processed.
$entry Entry Object
The entry currently being processed.
$form Form Object
The form currently being processed.
Examples
Change Email Opt Out
This example shows how you can change the 『Email Opt Out』 setting based on a field value in the Entry Object.
12345678add_filter( 'gform_zohocrm_contact_4', 'change_contact_argument', 10, 4 );function change_contact_argument( $contact, $feed, $entry, $form ) { if ( rgars( $feed, 'meta/feedName') == 'Zoho CRM Feed 2' && rgar( $entry, '5' ) == 'No' ) { $contact['Email Opt Out'] = 'true'; } return $contact;}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
1gf_apply_filters( 'gform_zohocrm_contact', $form['id'], $contact, $feed, $entry, $form )
This filter is located in GFZohoCRM::create_contact() in class-gf-zohocrm.php.
Helpful Snippets and Forum Topics
Setting Tabindex + Options
Pre-populate Any User Meta
Custom Validation for Set of Zipcodes
Add Javascript When There is a Validation Error
Unique ID
Custom Taxonomies Are Our Friends
Strip HTTP/WWW from Website Field Token
Pre-populate Based on Page/Post ID
Add Sub-pages to Gravity Forms Admin Nav
Conditional Fields Based on Whether the User is Logged In
Using Checkboxes for Post Custom Fields
Changing a field to be read-only
Populate a Form with Data from an Existing Lead
Conditional Notifications
Add a Setup Fee to a Subscription with PayPal