Drop Down

Drop Down

SummaryCommon SettingsGeneral SettingsAppearance SettingsAdvanced SettingsMerge TagsUsageModifiersCalculations

Summary

The Drop Down field allows users to select one option from a list. It is available under the Standard Fields section within the form editor.

Drop Down field as displayed in the Field Library

Drop Down field as displayed in the Form Editor.

Important: If your choice labels contain any HTML or special characters such as ampersands, commas, pipes, hyphens or brackets of any type, you MUST enable the show values feature and give each choice a simple and unique value which does not contain any special characters. Failure to configure values could cause issues for features such as calculations, conditional logic, dynamic population, and validation.
The value for each choice must be unique in any case, even if you』re not using HTML or special characters for the choice labels.

Common Settings

This field uses only common field settings for the 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

SettingDescriptionChoicesAdd Choices to this field. You can mark each choice as checked by default by using the checkbox that appear to the left of each choice. Add a new choice by clicking the PLUS icon and delete a choice by clicking the DELETE icon.Show ValuesChecking this option will allow you to specify a value for each choice. Choice values are not displayed to the user viewing the form, but are accessible to administrators when viewing the entry.Bulk Add / Predefined ChoicesClicking the Bulk Add / Predefined Choices allows you to select a category and customize the predefined choices or paste your own list to bulk add choices. See this article for more information.

Appearance Settings

SettingDescriptionPlaceholderThe Placeholder will not be submitted along with the form. You can use the Placeholder to require the user to select any of choices.Enable enhanced user interfaceBy selecting this option, the chosen jQuery script will be applied to this field, enabling search capabilities to Drop Down fields and a more user-friendly interface for Multi Select fields.

Advanced Settings

SettingDescriptionDefault ValuePre-populates the value of the Drop Down field. Enter the choice you would like to display.

Merge Tags

For more information on the use of merge tags, refer to these articles.

Usage

{Field Name:2:modifier}

Modifiers

ModifierDescription:valueOutputs the value of the field instead of the choice label.:currencyConverts the value to a currency value.

Calculations

If you』re going to use this field type in a calculation formula, please check Number Formatting Rules in the Calculations doc page.

Donations Settings in the PayPal Payments Standard Add-On

Donations Settings in the PayPal Payments Standard Add-On

Transaction Type-specific Options

When using the PayPal Add-Ons for Gravity Forms, you can set various transaction types depending on your needs such as Products and Services, Subscription, and Donations.

Transaction Type-specific Options

If you select Donations from the Transaction Type drop down, the option below will appear.

The Payment Amount setting denotes which field will be used for the payment amount. It can be set to Form Total or an additional field that you have configured.

If you need more information on configuring feeds within the PayPal Payments Standard Add-On, you may review our article on Creating a Feed for the PayPal Payments Standard Add-On.

Disabling Mobile Keyboard Input on Datepicker Fields

Disabling Mobile Keyboard Input on Datepicker Fields

This quick block of Javascript will allow you to disable keyboard input within Date fields. This snippet is helpful if you need to avoid the virtual keyboard from appearing within the datepicker.

Dropbox Change Log

Dropbox Change Log

3.0.13.0 | 2021-09-022.9 | 2021-05-062.8 | 2020-09-242.7 | 2020-07-132.6 | 2020-04-012.5 | 2019-11-132.4 | 2019-07-242.3 | 2019-03-292.2 | 2019-02-122.1 | 2018-03-212.0 | 2017-06-161.3 | 2017-03-151.2 | 2016-03-311.1 | 2015-11-021.0 | 2015-08-13

3.0.1

Added the gform_dropbox_should_upload_file filter.
Updated the minimum Gravity Forms version to 2.0.8.
Fixed an issue where the upload is attempted again for existing files, if the feed is reprocessed by other add-ons.
Fixed an issue where files with names that include Chinese characters aren't sent to Dropbox when uploaded via a multi-file enabled File Upload field.

3.0 | 2021-09-02

Added support for OAuth refresh tokens in accordance with changes to the Dropbox API.
Fixed the ability of custom apps with team permissions to authenticate.
Fixed an issue where it is not possible to disconnect a custom app if using an access token that has already been deauthorized.
Fixed the folder display so it is possible to select team folders when using a custom app with team permissions.
Fixed an issue where an empty space appears under the connect to dropbox button on the settings page.
Updated the user interface on the Dropbox settings page.
Updated the user interface of the authorization screen.

2.9 | 2021-05-06

Added accessibility enhancements to the Dropbox upload field.
Fixed styling of the Dropbox Upload field description to correctly display above or below the input in the editor in Gravity Forms 2.5.
Fixed an issue where authentication may not complete after attempting a connection with Dropbox.

2.8 | 2020-09-24

Updated support for Gravity Forms 2.5.

2.7 | 2020-07-13

Added security enhancements.
Added support for Gravity Forms 2.5.

2.6 | 2020-04-01

Added translations for Hebrew, Hindi, Japanese, and Turkish.
Updated a few labels on the settings page related to connecting and disconnecting the add-on with Dropbox.
Updated Gravity API domain.
Fixed an issue where the Dropbox Upload field can pass the required validation if a file is uploaded and then removed.

2.5 | 2019-11-13

Updated Javascript files, stylesheets to use minified versions.
Fixed an issue with files uploaded to Dropbox not attaching to notifications.
Fixed feed processing background request not registering in certain scenarios.
Fixed an issue in notifications with multiple Dropbox feeds tied to different file upload fields sometimes returning bad file URLs.
Fixed PHP warning caused by logging statement during feed processing.

2.4 | 2019-07-24

Added security enhancements.
Fixed Dropbox Upload field utilizing deprecated jQuery.live() function.
Updated Dropbox API requests to use WordPress requests API.

2.3 | 2019-03-29

Updated authentication process to create new folder for authenticated site.
Updated feed processing to not utilize WP_CONTENT_DIR and WP_CONTENT_URL.
Updated Dropbox PHP SDK.

2.2 | 2019-02-12

Fixed folder tree not defaulting to currently selected folder on initial load of feed settings page.
Fixed file selected in Dropbox Upload field not being saved when hidden input contains invalid JSON string.
Fixed shareable link not being returned if link already exists for file.
Removed deprecated logic events for Gravity Forms 2.4.
Restore link type and multiselect field settings.

2.1 | 2018-03-21

Added security enhancements.
Added gform_dropbox_shareable_link_settings filter to modify settings when generating a shareable Dropbox link.
Added GPL to plugin header.
Fixed Dropbox PHP SDK not being included in the 2.0.1 build.
Fixed the file extensions list used to initialize the Dropbox Chooser.
Updated Plugin URI and Auth or URI to use https.
Updated included version of Dropbox PHP SDK.

2.0 | 2017-06-16

Added minimum requirements needed to use Dropbox Add-On.
Updated Dropbox API calls to use latest version of Dropbox API.
Updated Dropbox authentication process.
Updated background feed processing request to not verify SSL by default.

1.3 | 2017-03-15

Fixed an issue with the Dropbox Upload field value on the entry list page.
Fixed an issue with the processing of the File Upload field.
Fixed PHP warning which could occur during validation of the Dropbox Upload field if no files were chosen.
Fixed an issue with notifications for events other than form_submission not being processed after the last feed is processed.
Fixed CSRF token error when authorizing with Dropbox.
Fixed file extension validation for Dropbox Upload form field.
Updated strings for translations.
Updated installation instructions to show only domain for Chooser/Saver domain.

1.2 | 2016-03-31

Added feed duplication support.
Added gform_dropbox_post_upload action that fires after a feed has been processed.
Added gform_dropbox_ssl_compatibility filter to override SSL compatibility test.
Fixed a fatal error which could occur if the request used to validate the app secret key fails.
Fixed a redirect loop issue when processing Dropbox feeds.
Fixed default label for Dropbox Upload field.
Fixed PHP fatal error when initializing API.
Fixed Update Settings button being hidden on plugin settings pages.
Modify execution order of gform_dropbox_post_upload.
Updated plugin compatibility check to verify existence of openssl_random_pseudo_bytes and mcrypt_create_iv functions.
Updated SSL compatibility check to allow for 404 response codes.

1.1 | 2015-11-02

Added error message for versions of PHP that do not support 64-bit integers.
Added some additional logging statements.
Added SSL compatibility check to prevent plugin from running when SSL is not available.
Fixed Dropbox PHP SDK autoloader from being included when if autoloader class already exists.
Fixed Dropbox Upload field being included if custom app key and secret were not provided.
Fixed files uploaded through the Dropbox Upload field not uploading to remote Dropbox.
Removed debugging output from plugin settings page.
Updated plugin settings with a more streamlined install process.
Updated save URL functions to use WordPress API functions.

1.0 | 2015-08-13

It』s all new!

Display a message on the login form when the user is pending activation

Display a message on the login form when the user is pending activation

This example shows how the WordPress authenticate filter can be used to check if the user attempting to login is still pending activation so a custom message can be displayed instead of the standard unknown username or email message.

add_filter( 'authenticate', function ( $user_or_error, $username_or_email ) {
// Abort if the user has already been authenticated or the UR add-on is not active.
if ( $user_or_error instanceof WP_User || ! function_exists( 'gf_user_registration' ) ) {
return $user_or_error;
}

// Abort if authentication failed for an unsupported reason.
if ( is_wp_error( $user_or_error ) && ! in_array( $user_or_error->get_error_code(), array(
'invalid_username',
'invalid_email',
) ) ) {
return $user_or_error;
}

add_filter( 'gform_user_registration_pending_activation_expiration', 'authenticate_pending_activation_expiration' );
$key = strpos( $username_or_email, '@' ) ? 'user_email' : 'user_login';
$is_pending = gf_user_registration()->pending_activation_exists( $key, $username_or_email );
remove_filter( 'gform_user_registration_pending_activation_expiration', 'authenticate_pending_activation_expiration' );

// If there isn't a pending activation return the original error.
if ( ! $is_pending ) {
return $user_or_error;
}

$custom_error_message = 'Account is pending activation.';

// If the UR login form is being used add the error to the first field.
if ( isset( $_POST['gform_submit'] ) && absint( $_POST['gform_submit'] ) === 0 ) {
$field = GFAPI::get_field( gf_user_registration()->login_form_object(), 1 );
$field->failed_validation = true;
$field->validation_message = $custom_error_message;
}

return new WP_Error( 'pending_activation', $custom_error_message );
}, 30, 2 );

// Callback for the gform_user_registration_pending_activation_expiration hook.
// Prevents the pending activation being deleted by the pending_activation_exists() check if it is a few days old.
function authenticate_pending_activation_expiration() {
return YEAR_IN_SECONDS;
}

This code snippet is compatible with both the standard WordPress login form and the login form included with the User Registration Add-On.

PHP based code snippets like this can be added to the theme functions.php file or a custom functions plugin.

Dropbox Feed Meta

Dropbox Feed Meta

IntroductionUsageProperties

Introduction
The Feed Object meta for the Dropbox add-on is an associative array containing the properties which determine how the add-on should process the form submission.
$feed['meta'] = array(
'feedName' => 'Dropbox Feed 1',
'fileUploadField' => 'all',
'destinationFolder' => '/local.wordpress.dev',
'feed_condition_conditional_logic' => true,
'feed_condition_conditional_logic_object' => array(
'conditionalLogic' => array(),
),
);

Usage
We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:
$conditional_logic_enabled = rgars( $feed, 'meta/feed_condition_conditional_logic' );

Properties

feedName string
The feed name which appears on the add-ons feeds tab.

fileUploadField string
The ID of the field containing the files to be uploaded to Dropbox or 『all』 to upload files from all relevant fields.

destinationFolder string
The folder in the Dropbox account where the files will be stored.

feed_condition_conditional_logic boolean
Is the feed condition (conditional logic) setting enabled. Default is false.

feed_condition_conditional_logic_object array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

Downloading a Gravity Forms Add-On

Downloading a Gravity Forms Add-On

Pre-RequisiteDownloadingInstalling an Add-OnSetting up an Add-On

Pre-Requisite
To download an Add-On, you must be have at least one active Gravity Forms license of the appropriate level. To see which Add-Ons are available with your license type, review our Add-Ons page. If you own multiple license types, you will have access to downloads based on the highest level of active license you own.
Downloading
To download an Add-On via the Gravity Forms website, navigate to the Gravity Forms account login page and login with your Gravity Forms credentials. Then click Downloads in the submenu to see all the files available for download.
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.
You can also install directly via the admin area of your WordPress site. Login to your dashboard and go to Forms > Add-Ons. From here you can install any official Gravity Forms Add-On that is permitted by your license level.
Installing an Add-On
Your next step is to install the Add-On. Refer to this article for the various installation methods.
Setting up an Add-On
Each Add-On can have different set-up and activation requirements. Refer to the appropriate add-on documentation section for advice on any setup required for your Add-On.

Displaying a Form Within a Modal/Popup/Lightbox

Displaying a Form Within a Modal/Popup/Lightbox

IntroductionObtain the Popup Maker pluginEmbed your Form

Note: This tutorial is provided as a suggestion only. We do not support third party solutions. If you have any troulbe using Popup Maker, please contact with its author.

Introduction

Sometimes you may want to display your form within a box that will display over the current page. This is especially handy when encouraging newsletter signups on your site. In this article, we will show you how to embed any forms made with Gravity Forms into a popup window in just a few steps using a third-party plugin.

Obtain the Popup Maker plugin

The easiest way to create a popup window and embed Gravity Forms into it is to do so using the Popup Maker plugin. Simply download and install the Popup Maker plugin either from within your WordPress admin dashboard or manually.

Embed your Form

To embed your form, it』s as simple as creating a new popup, and embedding your form just as you would any other post or page. To do so, simply click the Add Form button.

When embedding your form, ensure that AJAX is enabled to avoid the page refreshing. To do so, either use the Enable AJAX checkbox when adding a form using the button, or add ajax=」true」 to your Gravity Forms embed shortcode.

¿Need more help creating your popup? Please contact the Popup Maker author for further assistance and tips.

Dropbox Upload Field

Dropbox Upload Field

IntroductionNotesGeneralAppearanceAdvancedMore Information

Introduction
The Dropbox Upload field uses the Dropbox JavaScript Chooser API to allow your users to select files from their Dropbox account. When the form is submitted, the field value will contain the Dropbox preview links for the selected files.
During submission, if your form also has a Dropbox feed, then the feed processor loops through all selected Dropbox Upload fields for the form and sends a copy request to Dropbox to move the selected files to the Dropbox folder chosen in the feed settings. Once the copy requests are complete, the Gravity Forms entry is updated with the new Dropbox links and notifications are sent out.

Notes
The Dropbox Upload field is only available when you have configured the add-on to use a custom app. See the Creating A Custom Dropbox App article for more details.
If the account the file is being uploaded from is the same as the account is being uploaded to, the Dropbox share link will be to the original file location. Same account includes:

Uploading from a personal account to the same personal account
Uploading from a personal account to a business account that is linked to the personal account
Uploading from a business account to a personal account that is linked to the business account

General

Field Label
Enter the label of the form field. This is the field title the user will see when filling out the form.

Description
Enter the description for the form field. This will be displayed to the user and provide some direction on how the field should be filled out or selected.

Allow multiple files to be selected
This option allows the user to upload multiple files.

Allowed file extensions
Enter the allowed file extensions for file uploads. This will limit what type of files a user may upload.

Rules
These properties set rules for how the data should be handled.

Required
A required field will prevent the form from being submitted if it is not filled out or selected.

Appearance

Field Label Visibility
Select the label visibility for this field. Labels can either inherit the form setting or be hidden.

Description Placement
Determines where, in relation to the field, the labels will be placed. The labels can be placed either above or below the Dropbox Chooser button.

Custom Validation Message
This allows you to set a custom message that will be displayed in the event that there is an error in the submission.

Custom CSS Class
Allows you to define a custom style for these fields to override the defaults.

Advanced

Admin Field Label
Enter the admin label of the form field. Entering a value in this field will override the Field Label when displayed in the Gravity Forms administration tool.

Visibility
Select the visibility for this field. Field visibility set to Everyone will be visible by the user submitting the form. Form field visibility set to Admin Only will only be visible when editing the entry on the entry detail page.

Enable Conditional Logic
Create rules to dynamically display or hide this field based on values from another field. Remember, to use conditional logic, you will need to create a dropdown, checkbox or multiple choice field.

More Information
See the GF_Field_Dropbox article for more details about this field type.