rgexplode()

rgexplode()

DescriptionUsageParametersExampleSource Code

Description
Explodes a string into an array of strings.
Usage
1rgexplode( $sep, $string, $count ),
Parameters

$sep string
The separator between items. Commonly, a comma is used.

$string string
The string of values to be placed within an array.

$count string
Determines the maximum number of items to be placed within the array.

Example
12345// Gets the first 5 values and places them into an array.$sep = ',';$string = 'item1,item2,item3,item4,item5,item6,item7,item8,item9';$count = 5;$items = rgexplode( $sep, $string, $count );
Source Code
This function is located in gravityforms.php

rgempty()

rgempty()

DescriptionUsageParametersExamplesChecking for an empty array.Source Code

Description
Checks if an array or key within an array is empty.
Usage
rgempty( $name, $array );

Parameters

$name string
The array or key to be checked.

$array array
If checking if a key within an array is empty, this parameter contains your array. Default is $_POST.

Examples
Checking for an empty array.
// This would return _true_.
$name = array();
rgempty( $name );

// This would return _false_.
$name = array( 'something' );
rgempty( $name );

// This would return _true_ as the key assigned to _$name_ doesn't exist.
$name = 'empty_key';
$array = array(
'key1' => 'value1',
'key2' => 'value2',
'empty_key' => ''
);
rgempty( $name, $array );

Source Code
This function is located in gravityforms.php

rgblank()

rgblank()

DescriptionUsageParametersReturnsExamplesSource Code

Description
Checks if a variable contains a string.
Usage
rgblank( $text );

Parameters

$text string
Text string to check.

Returns

$result bool
False if it is a string, true otherwise.

Examples
$text = 'This is a string';
rgblank( $text );

Source Code
This function is located in gravityforms.php

rgars()

rgars()

DescriptionUsageParametersExamplesSource Code

Description
Finds a value within a multi level array. Forward slashes ( / ) are used to descend down the structure of the array.
Usage
1rgars( $array, $name );
Parameters

$array array
The array that you want to obtain a value from.

$name string
The array keys, separated by a forward slash, to be located.

Examples
12345678910// Defines the multilevel array, and transcends it to get the value.$array = array(   'firstlevel' => array(      'secondlevel' => array(         'thirdlevel' => 'Desired Value'       )   ))$name = 'firstlevel/secondlevel/thirdlevel';rgars( $array, $name );
Source Code
This function is located in gravityforms.php

rgar()

rgar()

DescriptionUsageParametersReturnsExamples1. Key exists2. Key does not exist3. Key does not exist but default value provided4. Used with IF statement5. Used with Ternary ShorthandSource Code

Description

Get a specific property of an array without needing to check if that property exists.

Provide a default value if you want to return a specific value if the property is not set.

Usage

rgar( $array, $prop );

rgar( $array, $prop, $default_value );

Parameters

$array arrayArray from which the property』s value should be retrieved.   $prop stringName of the property to be retrieved. $default_value stringValue that should be returned if the property is not set or empty. Defaults to null. This parameter is OPTIONAL.

Returns

null|string|mixed The value

Examples

1. Key exists

This example will return the value for the key 「dog」 – Roddenberry.

$pets = array(
'dog' => 'Roddenberry',
'cat' => 'Tucker'
);
rgar( $pets, 'dog' );

2. Key does not exist

This example returns the value for the key 「ferret」. Since this key does not exist and no default value was provided to the function, null is returned.

$pets = array(
'dog' => 'Roddenberry',
'cat' => 'Tucker'
);
rgar( $pets, 'ferret' );

3. Key does not exist but default value provided

This example returns the value for the key 「ferret」. Since this key does not exist the default value passed to the function is returned – Malcolm.

$pets = array(
'dog' => 'Roddenberry',
'cat' => 'Tucker'
);
rgar( $pets, 'ferret', 'Malcolm' );

4. Used with IF statement

This examples checks the Form Object to see if the honey pot is enabled.

// Honey pot.
$honey_pot_checked = '';
if ( rgar( $form, 'enableHoneypot' ) ) {
$honey_pot_checked = 'checked="checked"';
}

5. Used with Ternary Shorthand

This example checks the Confirmation Object to see if its type is set, if so, the confirmation type is set to its value, otherwise the type is set to 「message」.

$confirmation_type = rgar( $confirmation, 'type' ) ? rgar( $confirmation, 'type' ) : 'message';

Source Code

This function is located in gravityforms.php

RG_CURRENT_VIEW

RG_CURRENT_VIEW

DescriptionUsagePlacement

Description
Defines the current view within Gravity Forms. If the view from the querystring is set, that string is returned, otherwise false is returned.
Note: This constant is used in legacy versions of Gravity Forms, meaning before the database schema change in version 2.3. Later versions simply use the code below to get the current view.
1rgget( 'view' )
Usage
1define( 'RG_CURRENT_VIEW', GFForms::get( 'view' ) );
Placement
This constant is set in the file gravityforms.php.

Reviewing Spam Submissions

Reviewing Spam Submissions

Entry PageEntries FilterQuick ActionBulk ActionEntry Detail Page

The following features are available on the Entries List and Entry Detail pages when entries have been marked as spam by a compatible anti-spam plugin.

Entry Page

Entries Filter

A Spam link, with entry count, appears above the entries list table. This link allows you to view entries which have been marked as spam. This is where you will most likely find missing submissions.

Quick Action

A Spam or Not Spam link will appear as a quick action when hovering over each entry in the entries list table.

Clicking the Spam link changes the entry status property to spam, moving it out of the all entries view and into the spam filter view.

Clicking the Not Spam link changes the entry status property to active, moving it back into the all entries view.

Bulk Action

Multiple entries can be selected and marked as spam or not spam using the bulk action drop down, located above and below the entries list table.

Entry Detail Page

Spam or Not Spam links appear in the sidebar at the bottom of the entry info meta box.

Reviewing Entries (Form Submissions)

Reviewing Entries (Form Submissions)

Accessing EntriesFiltering EntriesExporting/Importing Form Submissions

When a form is submitted, typically you will be notified via the notification system. If you need to review submissions outside of email, Gravity Forms collects all submissions within your WordPress admin dashboard.

In this article, we will show you how to review the submissions that arrive from your forms, referred to as 「Entries」.

Accessing Entries

Within your WordPress admin dashboard, click on Forms in the left side navigation menu.You should now see a list of all forms. To access the submissions for a form, hover over the form you want to access, and click on Entries.You should now see a list of all form submissions listed on the Entry list page.To view the details of a form submission, click on the specific entry.

Filtering Entries

When reviewing form submissions, it is also possible to filter them to get the exact data you』re looking for. This is especially helpful if you have a large number of submissions over time.

To filter, use the drop downs and text field at the top right.

Exporting/Importing Form Submissions

For instructions on how to export form submissions, please see the Exporting Form Entries article.

In order to import entries without form submission you will need a third party add-on. Refer to the Gravity Forms Community Add-Ons page for a list of add-ons supported by third party contributors.

Retiring The Batchbook Add-On

Retiring The Batchbook Add-On

The Batchbook service has been shutdown, with all data and services being closed as of of January 2019. With that in mind, as of November 2019 we have retired the official Gravity Forms Batchbook Add-On also.
This means that the plug-in:

can no longer be downloaded from our website or the add-on browser
can no longer be supported by our customer service team.
all user guides were removed from our documentation site in 2021.

If you have any further questions, please contact our support team.