Refunds in the Square Add-On

Refunds in the Square Add-On

Initiating a RefundNotification on Refund

Initiating a Refund
You can initiate a refund from within your form entries for the Square Add-On. Any entry which has collected payment (has a status of Paid), will display a Refund Payment option in the Payment Details section of the entry detail.
Clicking that button will refund the payment (via your Square service) and then update the screen with details about the pending refund.

Notification on Refund
If you have the Square Add-On installed, then notifications can be sent on the event of Payment Authorized, Payment Capture Failed, and Payment Refunded.

Refunds in PayPal Checkout

Refunds in PayPal Checkout

Initiating A Refund

Initiating A Refund
Refunds are handled from the Entry Detail screen.
If an entry has a status of Paid, it will also display a Refund Payment button in the Payment Details section of the entry detail. Clicking that button will initiate the refund process within your PayPal account, and the entry will be updated with details about the refund.

$redirect_url

$redirect_url

DescriptionPropertiesUsageLocationUsed By

Description
The $redirect_url property defines the URL that a user is redirected to upon submitting the form. This value is typically the location of a payment gateway to complete payment.
If left as an empty string, the redirect URL is ignored, and the user is not redirected after submission.
Properties
Class: GFPaymentAddOn
Access: protected
Type: boolean
Defaults to: false
Usage
123class ExamplePaymentAddOn extends GFPaymentAddOn {    protected $redirect_url = 'https://gravityforms.com';}
Location
includes/addon/class-gf-payment-addon.php
Used By
GFPaymentAddOn::entry_post_save()
GFPaymentAddOn::validation()

reCAPTCHA Add-On Change Log

reCAPTCHA Add-On Change Log

1.1 | 2021-07-211.0 | 2021-06-23

1.1 | 2021-07-21

Fixed an issue where an undefined variable notice appears on the add-on settings page.
Fixed an issue where forms can fail validation if they include dynamically added fields such as the honeypot.
Fixed an issue where the reCAPTCHA response is saved and output by merge tags.
Fixed an issue where submissions from the User Registration Add-On login form are blocked.

1.0 | 2021-06-23

It's all new!

reCAPTCHA Add-On Settings Reference

reCAPTCHA Add-On Settings Reference

IntroductionGlobal SettingsWhere To Find ThemreCAPTCHA v3 SettingsreCAPTCHA v2 SettingsForm SettingsNotesFurther Information

Introduction

This quick reference guide lists all the settings related to the various CAPTCHA options offered within Gravity Forms, and includes a short description of their purpose.

Note that reCAPTCHA v3 settings are offered only if the reCAPTCHA Add-On is installed, while reCAPTCHA v2 settings are related to the CAPTCHA field.

For more detail, refer to the procedural guides and references listed in the Further Information section at bottom.

Global Settings

Where To Find Them

The reCAPTCHA Add-On global settings are accessible under the Gravity Forms Settings area in the WordPress admin. Follow the menu path Forms → Settings → reCAPTCHA.

Note that reCAPTCHA v3 settings are offered only if the reCAPTCHA Add-On is installed.

reCAPTCHA v3 Settings

SettingDescriptionSite KeyThe site key is used to invoke reCAPTCHA service on your site or mobile application. A valid key will have a green tick mark. See note (1).Secret KeyThe secret key authorizes communication between your application backend and the reCAPTCHA server to verify the user』s response. A valid key will have a green tick mark. See note (1).Score ThresholdEntries with a reCAPTCHA score less than or equal to this value will be classified as spam. Default is 0.5. See note (2).Disable Google reCAPTCHA BadgeThis will hide the Google reCAPTCHA Badge that is usually displayed on every page by default. To do this, you must confirm that you meet Google』s required conditions.

reCAPTCHA v2 Settings

SettingDescriptionSite KeySee v3 above. See note (1), (3).Secret KeySee v3 above. See note (1), (3).TypeDetermines which version of reCAPTCHA v2 will be used. Choose from Checkbox or Invisible. This is a site wide setting, and cannot be varied form to form. See note (4).Validate KeysComplete the 「I am not a robot」 reCAPTCHA to validate your v2 keys. If validation fails, an error message will be displayed here.

Refer to this article or this blog post for more detail on setting up reCAPTCHA version 2 for your site.

Form Settings

The reCAPTCHA Add-On adds a per form setting, which you can find within the Form Settings area. Note that reCAPTCHA v3 settings are offered only if the reCAPTCHA Add-On is installed.

SettingDescriptionDisable reCAPTCHA v3 for this formIf checked, will ignore reCAPTCHA scores for entries made through this particular form. Entries submitted when this setting is enabled will be marked as 「disabled」 under the score column in the entry list.

Notes

(1) Google reCAPTCHA keys are obtained from within your Google developer account. They must be generated for every site you wish to place reCAPTCHA on. (2) The higher the score (from 0 to 1) returned from Google, the more likely it reflects a good interaction. Refer to this Google article.(3) v2 Checkbox keys will not work for v2 Invisible reCaptcha. An invisible key pair is valid for either v2 type.(4) Refer to Google documentation in Further Information section for more information on reCAPTCHA v2 Types.

Further Information

Gravity Forms document Setting up the reCAPTCHA Add-On Gravity Forms document Using the reCAPTCHA Add-On.Google document reCAPTCHA developers pageGoogle document reCAPTCHA v2 info

Radio Field

Radio Field

IntroductionExampleUses

Introduction
The radio type field, part of the Settings API, renders a radio type input for each of the field choices.
Example
The radio button has a default_value of 「this is the label for choice2」 so the second choice will be selected. Because horizontal is set to true, the radio buttons will be displayed side-by-side instead of the default one per line.
1234567891011121314151617181920212223242526array(    'title'       => esc_html__( 'This is the title for Section 2', 'sometextdomain' ),    'description' => esc_html__( 'This is a description of the purpose of Section 2', 'sometextdomain' ),    'fields'      => array(        array(            'type'          => 'radio',            'name'          => 'myradio',            'label'         => esc_html__( 'this is the main label for the radio buttons', 'sometextdomain' ),            'default_value' => 'this is the label for choice2',            'horizontal'    => true,            'choices'       => array(                array(                    'name'    => 'choice1',                    'tooltip' => esc_html__( 'this is the tooltip for choice1', 'sometextdomain' ),                    'label'   => esc_html__( 'this is the label for choice1', 'sometextdomain' ),                    'value'   => 'this is the value for choice1'                ),                array(                    'name'    => 'choice2',                    'tooltip' => esc_html__( 'this is the tooltip for choice2', 'sometextdomain' ),                    'label'   => esc_html__( 'this is the label for choice2', 'sometextdomain' ),                ),            ),        ),    ),),
The code above will render the radio button field similar to the following:

Uses

settings_radio()
choices_have_icon()
get_choice_attributes()

Radio Buttons

Radio Buttons

SummaryCommon SettingsGeneral SettingsNotesMerge TagsUsageModifiersCalculationsExample: Changing the Button Display

Summary

The Radio Buttons field allows users to select one option from a list. Only one option from the available choices can be selected. It is available under the Standard Fields section within the form editor.

Radio Buttons field as displayed in the Field Library

Radio Buttons field as displayed in the Form Editor.

Important: If your choice labels contain any HTML or special characters such as ampersands, commas, 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.

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

SettingDescriptionChoicesAdd Choices to this field. You can mark each choice as checked by default by using the checkbox that appears 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 ValuesAllows 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 ChoicesAllows you to select a category and customize the predefined choices or paste your own list to bulk add choices. See note 1.Enable 「Select All」 choiceAdd a text input as the final choice of your radio button field. This allows the user to specify a value that is not a predefined choice.

Notes

1. See this article for more information.

Merge Tags

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

Usage

{Field Name:2.1:modifier}

Modifiers

ModifierDescription:valueOutputs the value of the field instead of the normal choice text.: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.

Example: Changing the Button Display

The display of the radio button choices can be modified by using the gf_list category of CSS ready classes.

For example, to display the choices horizontally rather than vertically, enter the gf_list_inline CSS ready class in the field』s Custom CSS Class field under the Appearance tab.

This turns a multiple choice list into an inline horizontal list (not evenly spaced columns).

Refer to this article for a list of CSS Ready Classes.

Radio Buttons Field CSS Selectors

Radio Buttons Field CSS Selectors

ListChoicesLabelsInputs

List
Unordered list used to structure all of the individual list choices

example: standard multiple-choice list (ul) – applies to all forms
body .gform_wrapper .gform_body .gform_fields .gfield .gfield_radio {border: 1px solid red}

example: standard multiple-choice list (ul) – applies just to form ID #1
body #gform_wrapper_1 .gform_body .gform_fields .gfield .gfield_radio {border: 1px solid red}

example: standard multiple-choice list (ul) – applies just to specific multiple-choice list (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
body .gform_wrapper .gform_body .gform_fields #field_XX_X.gfield .gfield_radio {border: 1px solid red}

Choices
Individual list choices

example: standard multiple-choice list item (li) – applies to all forms
body .gform_wrapper .gform_body .gform_fields .gfield .gfield_radio li {border: 1px solid red}

example: standard multiple-choice list item (li) – applies just to form ID #1
body #gform_wrapper_1 .gform_body .gform_fields .gfield .gfield_radio li {border: 1px solid red}

example: standard multiple-choice list item (li) – applies just to specific multiple-choice list item (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
body .gform_wrapper .gform_body .gform_fields #field_XX_X.gfield .gfield_radio li {border: 1px solid red}

Labels

example: standard multiple-choice label – applies to all forms
body .gform_wrapper .gform_body .gform_fields .gfield .gfield_radio li label {border: 1px solid red}

example: standard multiple-choice list label – applies just to form ID #1
body #gform_wrapper_1 .gform_body .gform_fields .gfield .gfield_radio li label {border: 1px solid red}

example: standard multiple-choice label – applies just to specific multiple-choice list item (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
body .gform_wrapper .gform_body .gform_fields #field_XX_X.gfield .gfield_radio li label {border: 1px solid red}

Inputs

example: standard multiple-choice input (radio button) – applies to all forms
body .gform_wrapper .gform_body .gform_fields .gfield .gfield_radio li input[type=radio] {border: 1px solid red}

example: standard checkbox input (radio button) – applies just to form ID #1
body #gform_wrapper_1 .gform_body .gform_fields .gfield .gfield_radio li input[type=radio] {border: 1px solid red}

example: standard checkbox input (cradio button) – applies just to specific multiple-choice inputs (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
body .gform_wrapper .gform_body .gform_fields #field_XX_X.gfield .gfield_radio li input[type=radio] {border: 1px solid red}

Quiz Scoring

Quiz Scoring

IntroductionPercentage score calculation Normal Scoring RulesWeighted Scoring RulesTotal score available for a question0% quiz floorHidden question scoringExamplesExample 1: Weighted scoring with a single choice questionExample 2: Weighted scoring with a multi-choice questionExample 3: Negative score for a wrong answer

Introduction

Normal scoring is a simplistic right or wrong grade for each question.

Weighted scoring allows you to specify different scores for each possible answer. For example, you could make one question worth 3 points for the correct answer, or even make wrong answers be a negative score. This affects how percentage score is calculated, so we have added some examples here to show you how it works.

Caveat: Quiz results are calculated dynamically on request, As such, if you change the correct answer (or the weighted score) on a question, all past Quiz Results will be re-calculated when viewed again, which may vary from what was previously presented in the results dashboard, or to the user at the time they completed the quiz.

Percentage score calculation

The percentage score for a quiz using is calculated as follows:

Score for all Answer(s) Chosen / Sum of Total Score Available for all questions

Scores received and total score available for each question is calculated, and then converted to a percentage.

How each of these components is calculated depends upon the scoring method used in your Quiz field.

Normal Scoring Rules

Under normal (non-weighted) scoring, a correct answer (the answer identified in settings with the checkmark/tick) counts as 1, and an incorrect answer as 0. As such, the percentage score will be the percentage of correct answers.

Questions hidden by conditional logic at the time of quiz submission will still be counted in scoring calculations. They register as an incorrect answer.

If a multiple choice question has multiple correct answers, then a user must select them all for the question to be presented as correct (e.g. in the results summary).

Weighted Scoring Rules

Total score available for a question

This total score available for a weighted score quiz question depends on the Quiz field type used. calculated as follows:

For a single-choice Quiz field type, the total score available is defined as:Value of the highest scored answer.

For a multi-choice Quiz field type, the total possible is different: Sum of all positive scores assigned to answers.

This means that for a single answer question with multiple scores, the user may get 100%, even when selecting an incorrect answer, if that incorrect answer was weighted with the same (or greater) score as the correct answer.

The 「correct」 answer marker has no affect on weighted scoring, but does affect the display of correct and not-correct summaries in the quiz results.

0% quiz floor

Percentage score for a quiz can never be less than 0%, and will be rounded up to 0.

Hidden question scoring

Questions hidden by conditional logic at the time of quiz submission will still be counted in scoring calculations. They register as an incorrect answer.

Examples

Here are some examples to clarify how these rules interact.

Example 1: Weighted scoring with a single choice question

A radio button question (only one answer permitted) has the following answers, where weighted scoring has been used to establish a preferred correct answer, and a partially correct answer.

(A) Option A (3 points) (correct answer)(B) Option B (1 points) (correct answer) (C) Option C (0 points)

If a user chooses A, they are marked as correct, and receive a percentage score of 100% (3/3). If a user chooses B, they are marked as correct, and receive a percentage score of 33% (1/3).If a user chooses C, they are marked as incorrect, and receive a score of 0%.

Example 2: Weighted scoring with a multi-choice question

A checkbox question (multiple answers permitted) has the following answers, where weighted scoring has been used to establish a preferred correct answer, and a partially correct answer.

(A) Option A (3 points) (correct answer)(B) Option B (1 points) (correct answer) (C) Option C (0 points)

If a user chooses A, they are marked as incorrect (did not specify all correct answers), and receive a percentage score of 75% (3/4). If a user chooses B, they are marked as incorrect (did not specify all correct answers), and receive a percentage score of 25% (1/4).If a user chooses A and B, they are marked as correct and receive a percentage score of 100% (4/4).If a user chooses C, they are marked as incorrect, and receive a score of 0%.

Note: If a user chose all 3 answers in this example, they would also receive a percentage score of 100%, though the quiz results for that question would consider this incorrect (a non-correct answer was selected). As such, for checkbox questions it can sometimes be worth setting up the incorrect answers as negatively scored. For example, if Option D was scored as -3, than selecting all 4 options would get you only 67%. This will depend on how you want your quiz questions to be marked.

Example 3: Negative score for a wrong answer

A quiz has two radio button questions (only one answer permitted) has the following answers, where weighted scoring has been used to establish a penalty for the wrong answer:

Question 1(A) Option A (3 points) (correct answer)(B) Option B (-1 point)

Question 2(A) Option A (1 point) (correct answer)(B) Option B (-1 point)

If a user chooses A and A, they would receive a quiz percentage score of 100% (4/4). This is because negative scores do not affect the total score available for the question, so the quiz possible total is 3+1=4. If a user chooses A and B, they would receive a percentage score of 50% (2 out of possible 4).If a user chooses B and B, they would receive a percentage score of 0%. Even with negative scoring, a quiz result will never be less than 0%.