Survey Change Log

Survey Change Log

3.7 | 2021-04-293.6 | 2020-09-303.5 | 2020-05-133.4 | 2019-08-073.3 | 2018-12-033.2 | 2017-05-163.1 | 2016-08-313.0 | 2016-04-142.6 | 2015-10-082.5 | 2015-02-162.4 | 2014-10-162.3 | 2014-09-242.1 | 2014-02-282.0 | 2014-02-111.0.41.0.31.0.21.0.1 | 2013-06-211.0 | 2013-06-121.0.beta21.0.beta1

3.7 | 2021-04-29

Added right-to-left language support for the Rating, Rank, and Likert survey field types.
Fixed an issue where script tags are output above the document head element.
Fixed an issue with Likert Survey field on mobile when the labels are hidden.
Fixed CSS styles for better compatibility with Gravity Forms 2.5.
Fixed a deprecated usage of jQuery ready event.

3.6 | 2020-09-30

Added support for Gravity Forms 2.5.
Fixed an issue where survey dropdown field is not displayed properly if the field type was single line text with a mask before it was changed to dropdown.

3.5 | 2020-05-13

Added security enhancements.
Updated Javascript files, stylesheets to use minified versions.
Updated Javascript events to use standard Gravity Forms events for consistency.
Fixed an issue where the "n of n items shown" message from the form editor can be displayed on the front-end when the Rank field choices are populated via a filter.
Fixed an issue with the label styles used by the field general settings in the form editor.

3.4 | 2019-08-07

Added security enhancements.
Updated Likert field entries page filters for Gravity Forms 2.4+.

3.3 | 2018-12-03

Added security enhancements.
Added "value" modifier to Likert field merge tag to return column text only.
Updated compatibility issue with conditional logic and Gravity Forms 2.4.

3.2 | 2017-05-16

Added Chinese (China) translation. Credit: Edi Michael.
Updated minimum Gravity Forms version to 2.0.
Updated strings for translations.
Updated Likert CSS for better mobile display.
Updated low resolution PNG icons with scaleable vector graphics (SVG).
Fixed Survey field settings referencing incorrect icon URLs.
Fixed an issue with the Likert field markup.
Updated inline image in rank field so that it is applied via CSS instead.
Fixed an issue with the locations the gform_merge_tags hook was being used to include the merge tags.

3.1 | 2016-08-31

Fixed an issue with Likert field column labels which contain HTML displaying the HTML markup for mobile devices.
Fixed issue exporting Likert field values if the row label included trailing spaces.
Fixed an issue validating/saving the multi-row Likert field which could occur if the field has had ten or more rows defined and then one or more rows removed causing a mismatch between the ids used in the front-end input name attributes and the ids in the field inputs property.
Fixed an issue with how the empty Likert field value was handled in the {all_fields} output.
Fixed an issue which caused the Likert field value to be lost when editing the entry.
Fixed an issue which could prevent field values of 0 being displayed on the entry detail page.

3.0 | 2016-04-14

Added support for Gravity Forms v2.0.
Added GF_Field_Rating.
Added GF_Field_Rank.
Added GF_Field_Survey.
Added GF_Field_Likert.
Added DocBlocks.
Added support for using the Rating type field with conditional logic.
Added support for exporting the choice text when using the 2015 batch & future feed add-ons. Requires Gravity Forms 1.9.15.12.
Added label and description placement setting to the Survey field.
Updated minimum Gravity Forms version to 1.9.17.
Updated to use object notation when accessing the field object.
Updated the styles to adapt better to different screen sizes.
Updated the score merge tag to support returning the Likert row score e.g. {score:id=1.5} would return the score for field 1 row 5.
Updated Likert field preview in form editor to display only the first five rows.
Increased width of input boxes for weighted score values.
Fixed an issue with the tooltip in the rank field where text can get cut off if certain special characters are included in the choice label.
Fixed an issue with the merge tag values in the query string of a redirect confirmation.
Fixed an issue with empty Likert fields being displayed on the entry detail page when 'show empty fields' is not selected.
Fixed a typo in the Rank type fourth choice string.
Fixed an issue with the Likert field in entry exports when the field rows are changed after entries are saved.
Fixed an issue with some untranslatable strings.
Fixed an issue with the display of Likert field values for some entries on the entry list when the field rows are changed after entries are saved.
Fixed an issue with the Likert field label for attribute.

2.6 | 2015-10-08

Fixed an issue with the input ID attributes for the Likert and Rating type fields.
Fixed an issue in the form editor where removing a likert row didn't remove the corresponding input property.
Fixed an issue which caused survey merge tags to be replaced during form render.
Fixed an issue with the Likert field row specific merge tag which caused all the rows to be included in the output instead of just the specified row.

2.5 | 2015-02-16

Added support on the results page for score averages by row in multi-row Likert fields (requires Gravity Forms 1.9).
Added Spanish (es_ES) translation.
Updated front-end script dependency to include jquery-touch-punch on mobile devices enabling touch support for the Rank field.
Updated POT file.
Fixed an issue with the processing of merge tags for multi-row Likert fields which would prevent the field being included in notifications/confirmations when using Gravity Forms 1.9.
Fixed two untranslatable strings in the form editor.
Fixed a notice in the entry detail page for imported forms.
Fixed an issue under PHP 5.2 where score for multi-row likert field was not displayed correctly in email notification if any row was not answered.
Fixed an issue where score for multi-row likert field was not displayed correctly in email notification if any row was not answered.

2.4 | 2014-10-16

Added function gf_survey to easily get a Survey instance.
Added text domain/path to header.
Added support for Gravity Forms 1.9 form editor drag and drop.
Updated protected functions to be public.
Updated to have the file class-gf-survey.php and organized code into this file and survey.php
Updated version to use a variable.

2.3 | 2014-09-24

Adding tabbing support for likert fields.
Updated the ratings field UI in the form editor to display the choices in the more natural order of worst at the top to best at the bottom instead of the reverse. The front-end UI is not affected.
Fixed issue where score for multi-row likert field was always 0 if any row was not answered.
Fixed the field title in the Form Editor.
Fixed a strict notice preventing the results to be displayed in PHP 5.4+.
Fixed an issue with the dynamic population parameter names for multi-row Likert fields reverting to default values after re-opening the field settings.
Fixed an issue with the resending of notifications from the entry detail page where the choice values were being displayed instead of the choice text.

2.1 | 2014-02-28

Fixed issue when exporting entries.

2.0 | 2014-02-11

Added integration with the Add-On Framework.
Added integration with the Campaign Monitor Add-On, MailChimp Add-On, AWeber Add-On, and Zapier Add-On.
Fixed entries tab for the Contacts Add-On.
Fixed entry editor; scripts and styles now loaded.

1.0.4

Added support for survey entries tab in the Contacts Add-On.
Fixed an issue where survey merge tags would appear in the list of merge tags available during pre-submission.
Added support for decimal score values in the Likert field.

1.0.3

Added total score to entry meta.
Added total score entry meta to the results filters and to the conditional logic filters for notifications and confirmations. Only available for likert fields with scoring enabled.

1.0.2

Requires Gravity Forms version 1.7.6.6+.
Implemented the Add-On Framework.
Added weighted scoring for likert fields.
Added score merge tags.

1.0.1 | 2013-06-21

Fixed an issue with multi-row likert fields having more than 9 rows. The submitted value for every tenth row would not be saved.

1.0 | 2013-06-12

Changed the validation of required multi-row likert fields to require responses for all rows.
Fixed an issue with entries export where the choice value could be exported instead of the label.
Fixed an issue with results not being displayed when double quotes are inside field choices labels.
Fixed an issue with results not being displayed in no conflict mode.
Fixed an issue with multi-row likert fields and rank fields not retaining selected values when stepping back a page on multi-page forms.
Fixed an issue with multi-row likert fields not importing correctly.
Fixed an issue with rank fields not working on some pages of multi-page ajax-enabled forms.

1.0.beta2

Added gform_form_pre_results filter so the form object can be manipulated before the results are calculated for the admin results page.
Added required field setting to likert and rating fields.
Added tooltips for the field settings.
Fixed an issue where the plugin couldn't be activated on servers with shorttags disabled.
Fixed merge tags for likert multple rows and rating fields.

1.0.beta1

Initial version.

Survey

Survey

SummaryCommon SettingsGeneral SettingsSurvey Field Type OptionsNotesAdditional Likert OptionsAdditional Single Line Text OptionsMerge TagsUsageModifiersSurvey Specific Merge Tags

Summary

The Survey field is available when using the Survey add-on and simply allows you to create survey questions that users can answer. It is available under the Advanced Fields section within the form editor. If you do not already have the Survey add-on installed, you』ll need to do so before this field is available.

Survey field as displayed in the Field Library

Survey field as displayed in the Form Editor, displaying the Likert choice type.

Common Settings

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

SettingDescriptionSurvey QuestionThis is simply the question that you would like to ask the user.Survey Field TypeDetermines how the survey field will be displayed to the user. See note below for options.Columns/ChoicesThis is where you will define the individual answers for your survey field.

Survey Field Type Options

This table lists the options available for displaying your survey field to a user.

OptionMethod of ChoosingLikertSelect items from a scale of options. For example, a scale of options from Strongly Disagree to Strongly Agree. See notes. RankRank items within a list by dragging and dropping elements into a top-to-bottom order. RatingRate by stars. Each rating corresponds to a choice defined in the field settings. Radio ButtonsSelect one choice only by clicking a radio button. CheckboxesSelect one or multiple choices using checkboxes. Enable 「Select All」 creates a choice for the user to select all other choices.Single Line TextEnter one line of custom text. See notes.Paragraph TextSimilar to the Single Line Text option, but allows for multiple lines of input. Maximum Characters limits the number of characters this field is allowed to have.Drop DownDisplay choices in a dropdown box. Users can only select one.

Notes

Additional Likert Options

Enable Multiple Rows allows multiples Likert questions to be asked in the same survey, basically increasing the number of rows in the Likert table.

Enable Scoring allows different scores for each column. Aggregate scores are displayed in the results page and can be used in merge tags.

Additional Single Line Text Options

Input Mask provides a visual guide allowing users to more easily enter data in a specific format such as dates and phone numbers. For more information on input masks, refer to this article.

Merge Tags

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

Usage

{Field Name:2}

Modifiers

This field type does not have any modifiers available.

Survey Specific Merge Tags

TagDescription{survey_total_score}Displays the total score for the survey. Scoring must be enabled on the survey field for it to be tallied.{score:id=x}Displays the score for a specific survey question. Scoring must be enabled on the survey field for it to be tallied.

Taking a Screenshot of Your Feed Settings

Taking a Screenshot of Your Feed Settings

IntroductionNavigate To your Feed SettingsTaking A Screenshot

Introduction

Sometimes when requesting technical support, our Support Engineers (or the ticket form) may request a screenshot of your feed settings.

This small guide gives a little advice on taking a good screenshot.

Navigate To your Feed Settings

The feed settings we are interested in can be accessed by clicking the Settings button at the top of the form editor page.

Navigate to the form in question.Click or hover over Settings at top. Scroll down and choose the add-on you need help with. You will be presented with a screens showing a list of feeds for that add-on.Click Edit on the feed you need help with.

This will place you on the feed settings screen we need.

Taking A Screenshot

Most operating systems have some screenshot taking functionality built in. Here』s some help for the most popular OSs:

Mac → support articleWindows → help guide

Alternatively, there are dozens of good third party screenshot taking apps available in your application marketplace. Here』s one many that many of our Mac using team members love: https://cleanshot.com/

Make sure to include field mappings, options, and conditional logic in the image. Sometimes the feed settings are too large to get a single screenshot of it all. If your screenshot software cannot support full page screenshots, then zoom out the view of your browser first. CMD – (command key and minus/dash key) on MacOS or CTRL – (command key and minus/dash key) on Windows. You can also take multiple screenshots if it is clearer.

Now you should have something to send us. A good screenshot can really get Support Team excited!

Testing for a Theme/Plugin Conflict

Testing for a Theme/Plugin Conflict

IntroductionBefore you startA backup is always advisedIf using a third-party builder or modal to embed the formIf the page is being cached or minified by a plugin or hosting companyTesting for Theme ConflictsTesting for Plugin Conflicts

Introduction
Gravity Forms uses WordPress』 best practices to make it as compatible as possible with all themes and plugins; however, some theme and plugin authors do not adhere to these best practices which can often result in a theme or plugin conflict with Gravity Forms.
The following sections provide instructions for determining if an issue you are experiencing with Gravity Forms is caused by a third-party. If you determine that your issue is not caused by a third-party following these instructions, please open a support ticket. If you were directed to this topic after having opened a ticket please reply to the ticket confirming that you have followed these steps and were still able to recreate this issue.
Before you start
A backup is always advised
It is advised to create a backup of your WordPress as good practise. Because you know what will happen the one time you forget this step…
If using a third-party builder or modal to embed the form
For the troubleshooting, you will want to create a test page, to embed your form directly using the WordPress form editor, without third-party builders or modal solutions.
Both WordPress Classic Editor and Gutenberg are supported.
If the page is being cached or minified by a plugin or hosting company
Caching and automatic JavaScript optimization techniques have been known to cause issues with plugins and even core WordPress features. It』s great to cache static pages to speed up loading times, but caching dynamic pages where you do changes often is not always a good practice. additionally, trying to automate the optimization of the scripts on the page without knowing each script』s needs is a possible way to break JavaScript related features.
So if your page is being cached or using any JavaScript related optimization done by a plugin, a CDN (e.g. CloudFlare, Sucuri, KeyCDN, etc) or your host using an internal proxy, Varnish, Redis object cache or any other caching engine, make sure to flush the cache and turn off caching and JavaScript optimizations completely during testing. Failure to do this can create false positives due to cached resources or the optimizations done.
Below you can find links to instructions to exclude your form page from caching for most used cached solutions
Breeze – CloudWays
CloudFlare
SG Optimizer
Sucuri
W3 Total Cache
WP-Optimize
WP Fastest Cache
WP Rocket
Some Hosts like WP Engine or Kinsta require the user to contact their support to request excluding the desired pages from their cache.
Fresh Forms for Gravity is a plugin that can help to deal with caching automatically in most cases.
Testing for Theme Conflicts
To test for a theme conflict:

Activate a default theme such as Twenty Thirteen, Fourteen, Fifteen, Sixteen, or Seventeen
Check to see if the issue still occurs

If the issue does not occur after having activated a default 「Twenty」 theme, your theme is causing a conflict with Gravity Forms.
If the issue continues to occur, you should then test for plugin conflicts.
Testing for Plugin Conflicts
To test for a plugin conflict:

Deactivate ALL plugins
Activate Gravity Forms
Check to see if the issue occurs

For multisite installations, you will need to ensure ALL plugins are disabled both on the sub-site Plugins menu (if it』s available) and the Network Admin Plugins page.
Also note Must-Use and Drop-ins plugins don』t have a deactivate option, if you have any of these installed, you will want to download their files to a safe place and remove them for testing.
If the issue does not occur, one (or more) of your plugins is causing a conflict with Gravity Forms. To determine which plugin(s) is causing the conflict, follow these steps:

Activate each plugin one by one
Check to see if the issue occurs after each plugin is activated

Text Field

Text Field

IntroductionExampleUses

Introduction
The text type field, part of the Settings API, renders a text input.
Example
The following example shows a section with two text boxes.
The first text box is required and upon submission, the function validate_mytextfield specified in the feedback_callback property will be called to check additional conditions.
The second text box only displays based on the result of the dependency property. If the field mytextfield_name (the first text box) has a value of showtestfield2 or test, the second text box will display.
array(
'title' => esc_html__( 'This is the title for Section 1', 'sometextdomain' ),
'description' => esc_html__( 'This is a description of the purpose of Section 1', 'sometextdomain' ),
'fields' => array(
array(
'type' => 'text',
'id' => 'mytextfield_id',
'name' => 'mytextfield_name',
'label' => esc_html__( 'This is my text field', 'sometextdomain' ),
'required' => true,
'value' => 'This is the data specified for the value property',
'default_value' => 'This is the data specified for the default value property',
'class' => 'medium',
'tooltip' => esc_html__( 'This is my tooltip', 'sometextdomain' ),
'tooltip_class' => 'tooltipclass',
'feedback_callback' => array( $this, 'validate_mytextfield' ),
),
array(
'type' => 'text',
'name' => 'mytextfield2_name',
'label' => esc_html__( 'This is my second text field', 'sometextdomain' ),
'dependency' => array( 'field' => 'mytextfield_name', 'values' => array( 'showtextfield2', 'test' ) ),
),
)
),

The code above will render the text boxes similar to the following:

Uses

settings_text()

Textarea Field

Textarea Field

IntroductionExampleUses

Introduction
The textarea type field, part of the Settings API, renders a textarea element.
Example
The following example shows a section with a textarea type field. The text specified in the default_value property for the textarea will display until the user enters new text and saves/submits.
array(
'title' => esc_html__( 'This is the title for Section 4', 'sometextdomain' ),
'fields' => array(
array(
'type' => 'textarea',
'name' => 'mytextarea',
'label' => esc_html__( 'This is my textarea', 'sometextdomain' ),
'default_value' => 'This is some default text that will show in the textarea',
'tooltip' => esc_html__( 'This is the tooltip for the textarea', 'sometextdomain' ),
'class' => 'large',
),
),
),

The code above will render the textarea field similar to the following:

Uses

settings_textarea()

The Importance of Updates

The Importance of Updates

Risks of neglecting updatesKeeping everything up to date

Often times when running a website, individuals will only make the changes they need and neglect the general maintenance of the site, including things such as updates. As described in our article on security practices, keeping WordPress as well as any plugins of themes is critical to your site』s health.
Risks of neglecting updates

The biggest risk you face by not keeping everything up to date is security issues. Many times, updates are pushed out to solidify the security of the code. By neglecting updates, critical security flaws can be introduced and cause issues such as a fully compromised website or allow execution of unwanted code. Simply keeping everything up to date at all times will largely prevent issues.
Lack of compatibility is also a concern if one thing is updated, but not others. For example, if you updated WordPress to the next major version, but not Gravity Forms, you can sometimes run into bugs as something Gravity Forms may have been using in the older version, may not be present or changed in the newer version.
A large majority of the code placed in minor updates, is simply to correct a bug that may exist. Failing to update your plugins can expose you to those bugs and sometimes lead to an overall poor experience.

Keeping everything up to date

Check for updates often. Simply logging into your WordPress admin dashboard and checking to see if updates are available will greatly assist you with keeping everything up to date.
Add license keys for Gravity Forms and other premium plugins. Without a valid license keys saved in the plugin settings, WordPress is unable to check for updates on your behalf.
Use a management tool. If you have multiple sites that you need to maintain, logging into each of them daily to check for updates can be a bit of a pain. Tools such as WP Remote can allow you to check multiple sites for available updates with a single click of a button.
Enable automatic updates. What』s better than logging into sites daily to check for updates? Automatic updates! The WordPress codex has an excellent article on enabling automatic updates both within WordPress core, as well as for plugins. You can find it at the Enabling Automatic Background Updates article.

Maintaining updated software by far one of the most important aspects of running a successful website. With the knowledge you have gained in this article, you should be able to easily maintain current copies of all software running on your site.

The simple_condition Helper

The simple_condition Helper

IntroductionInclude the custom settingDefine custom_logic_type field markupPopulate the fields drop downEvaluate the rules

Introduction
When using the Settings API there may be times when you need a field type which allows the user to define a simple conditional logic rule, that』s where the simple_condition() function helps.

Include the custom setting
Because there isn』t an actual simple_condition field type you would need to create your own Custom Field Type. In this example our custom field type will be named custom_logic_type, it is defined in the settings fields array like so:
12345array(    'label' => esc_html__( 'Simple condition', 'simpleaddon' ),    'type'  => 'custom_logic_type',    'name'  => 'custom_logic',),
Define custom_logic_type field markup
Now the setting has been included we need to define the markup for the custom_logic_type field type so it can be displayed on the settings page.
Because we don』t want the simple condition settings to be used all the time we will add a checkbox which can be used to enable/disable them. An onlclick event will be added to the checkbox to show/hide the div containing the simple condition settings.
1234567891011121314151617181920212223242526272829303132public function settings_custom_logic_type( $field, $echo = true ) {     // Get the setting name.    $name = $field['name'];     // Define the properties for the checkbox to be used to enable/disable access to the simple condition settings.    $checkbox_field = array(        'name'    => $name,        'type'    => 'checkbox',        'choices' => array(            array(                'label' => esc_html__( 'Enabled', 'simpleaddon' ),                'name'  => $name . '_enabled',            ),        ),        'onclick' => "if(this.checked){jQuery('#{$name}_condition_container').show();} else{jQuery('#{$name}_condition_container').hide();}",    );     // Determine if the checkbox is checked, if not the simple condition settings should be hidden.    $is_enabled      = $this->get_setting( $name . '_enabled' ) == '1';    $container_style = ! $is_enabled ? "style='display:none;'" : '';     // Put together the field markup.    $str = sprintf( "%s

%s

",        $this->settings_checkbox( $checkbox_field, false ),        $name,        $container_style,        $this->simple_condition( $name )    );     echo $str;}
Populate the fields drop down
We need to define which fields are to be available for selection in the simple condition settings fields drop down.
123456789101112131415161718192021222324252627282930313233public function get_conditional_logic_fields() {    $form   = $this->get_current_form();    $fields = array();    foreach ( $form['fields'] as $field ) {        if ( $field->is_conditional_logic_supported() ) {            $inputs = $field->get_entry_inputs();             if ( $inputs ) {                $choices = array();                 foreach ( $inputs as $input ) {                    if ( rgar( $input, 'isHidden' ) ) {                        continue;                    }                    $choices[] = array(                        'value' => $input['id'],                        'label' => GFCommon::get_label( $field, $input['id'], true )                    );                }                 if ( ! empty( $choices ) ) {                    $fields[] = array( 'choices' => $choices, 'label' => GFCommon::get_label( $field ) );                }             } else {                $fields[] = array( 'value' => $field->id, 'label' => GFCommon::get_label( $field ) );            }         }    }     return $fields;}
Evaluate the rules
To evaluate the rules the user configured for the custom_logic setting we will need to create a custom helper function. In this example the setting is being used on a form settings page so we need to retrieve them from the form settings. If the settings are being used on a feed settings page you would need to retrieve them from the $feed[『meta』].
1234567891011121314151617181920212223242526public function is_custom_logic_met( $form, $entry ) {    $settings = $this->get_form_settings( $form );     $name       = 'custom_logic';    $is_enabled = rgar( $settings, $name . '_enabled' );     if ( ! $is_enabled ) {        // The setting is not enabled so we handle it as if the rules are met.         return true;    }     // Build the logic array to be used by Gravity Forms when evaluating the rules.    $logic = array(        'logicType' => 'all',        'rules'     => array(            array(                'fieldId'  => rgar( $settings, $name . '_field_id' ),                'operator' => rgar( $settings, $name . '_operator' ),                'value'    => rgar( $settings, $name . '_value' ),            ),        )    );     return GFCommon::evaluate_conditional_logic( $logic, $form, $entry );}
This helper can then be used wherever you need to evaluate the rules, in the sample add-on available on GitHub the helper is used to determine if a custom action should be performed at the end of the form submission process.
123456789public function after_submission( $entry, $form ) {     // Evaluate the rules configured for the custom_logic setting.    $result = $this->is_custom_logic_met( $form, $entry );     if ( $result ) {        // Do something awesome because the rules were met.    }}