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()

About Processor Decline Errors When Attempting A Purchase

About Processor Decline Errors When Attempting A Purchase

IntroductionWhat is a Processor Decline?But Why Did They Reject The Charge? But there is no problem with my card!What can Gravity Forms do to resolve this? How can I resolve this?

Introduction

Simple transactions often get turned away by the myriad of institutions involved in carrying, validating, approving and executing a charge. Even perfectly valid credit cards can be caught in bank issues, setup problems and fraud risk algorithms. This article helps explain your possible next steps if this has happened to you while trying to make a purchase on the Gravity Forms website.

What is a Processor Decline?

Processor Decline is one of the most common causes of a failed transaction.

In summary, this is an error code returned from your financial institution (your bank or credit card company) to our payment processor that says the bank will not authorize this charge.

In more detail—when you enter your transaction details and press 「go」 on our purchase page, your details are securely sent from our payment collection site to a payment gateway, who』s job it is to obtain authorization for the charge from your bank, and then execute the commands necessary to initiate the transfer of funds between financial institutions.

They start this process by sending details and asking the bank, 「will you honor this charge?」. A processor decline is the bank』s way of saying 「No, we will not.」

But Why Did They Reject The Charge?

The bank does not provide many details with this message. We get an error code and short description (see link below), but since they are responsible for protecting your financial privacy, we get basically nothing else.

The link below shows a list of the types of error codes your bank may send with a processor decline. These are not always visible when you make a purchase, but we can look them up with you transaction metadata. Link: list of decline codes.

But there is no problem with my card!

We know, we hear that all the time! In our experience, how banks utilize their error codes can vary widely. With all the various state and country regulations, combined with a myriad of internal processes and staff training levels, financial institutions seem far from consistent in this, and definitely not faultless in how each executes this process.

For example, we frequently see error code 2001 (Insufficient Funds) for accounts and credit cards that have no fund issues.

As another example, we hear all the time about a credit card being refused on one site, but working perfectly well on others. Sometimes, this may be related to how the bank implements their own fraud risk algorithms, and what code they send back when they are worried about a possibly fraudulent transaction. Approaches to this issue seem very inconsistent from what little we can see at our end.

Lesson being, don』t trust the error code as written. If you have any doubt, ask your bank!

What can Gravity Forms do to resolve this?

Unfortunately, we have no actions we can take to alleviate these types of declines. We cannot override, skip or otherwise manipulate the bank』s processor response (for obvious reasons), and our payment gateway will always honor them as received and immediately abort the charge attempt. The solution always lies with your bank.

How can I resolve this?

Firstly, check the card details. You probably entered it right, but worth a double check.

If possible, try a different card. This may clean up the issue straight away. Or pay with PayPal, where card details do not have to be re-entered.

Otherwise, contact your bank. Reach out to their customer support and ask then why your charge of amount $X on date Y was rejected. Hopefully you get someone with the knowledge to identify a setup issue, or able to review their flags for a perceived 「unusual charge」 that may stop one charge from going through.

We understand this is a frustrating situation, we feel your customer frustration around it every day. Hopefully this article helped clarify the best pathways to resolving it!

Quiz

Quiz

SummaryCommon SettingsGeneral SettingsNotesMerge TagsRelated Filters

Summary

The Quiz field for Gravity Forms allows you to quickly create quizzes that are automatically graded or scored when the form is submitted. It is available under the Advanced Fields section within the form editor if you have the Quiz Add-On installed. For more information on setting up your Quiz field please review this article, and the other user guides for the Quiz Add-On.

Quiz field as displayed in the Field Library

Quiz field as displayed in the Form Editor.

Common Settings

For a description of each of the common field settings, refer to this article. Below you will find descriptions of specialty settings that are particular to this field.

General Settings

SettingDescriptionQuiz QuestionEnter your question here.DescriptionDisplays on your form to provide some additional direction to the user.Quiz Field TypeSelect between allowing a single choice using radio buttons or a drop down, or allowing multiple choices using a checkbox field typeQuiz AnswersAdd answers for this quiz question. Clicking the + to the right of a choice row to add more answer slots, or delete the current rows by clicking x. Select which answer, or answers, are correct by clicking the gray checkmark (turning it green).You must identify at least one correct answer for each Quiz field.Weighted Score By default, a correct answer counts as 1, and an incorrect answer as 0 towards the overall Quiz score. When Weighted Score is selected, a box with a 『0』 will show up to the right of each choice. Here you can define what the contribution to the quiz score will be for each answer when chosen. See note 1.Bulk Add / Predefined ChoicesCustomize the predefined choices or paste your own list of choices to add. This article covers this in more depth.Randomize Quiz AnswersRandomize the order in which the answers are displayed to the user. This setting affects only the quiz front-end. It will not affect the order of the results.Enable Answer ExplanationThis option enables you to provide an explanation of the answer. See note 2.

Notes

For detailed examples of weighted quiz scoring and how it is calculated, refer to this article. The Answer Explanation is shown to the user if Instant Feedback is enabled in the form level Quiz settings. The explanation will be shown immediately after answering each question. You can also display the explanation with the quiz results on your form』s confirmations or notifications via merge tags (i.e. {quiz:id=1} or {all_quiz_results}),

Merge Tags

You can view quiz-specific merge tags in this article.

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

Related Filters

The following filters were added to Gravity Forms in support of the quiz field:

gform_quiz_show_choice_valuesgquiz_answer_indicatorgquiz_incorrect_indicatorgquiz_correct_indicator

Quantity

Quantity

SummaryCommon SettingsGeneral SettingsMerge TagsUsageModifiersDecimal Quantity

Summary

The Quantity field allows a quantity to be specified for Product. It is available under the Pricing Fields section within the form editor.

Quantity field as displayed in the Field Library

Quantity field as displayed in the Form Editor.

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

SettingDescriptionProduct Field MappingSelect which product this field is tied to. This option is only available when there are two or more products. When only one product exists, Option and Quantity will automatically apply to that product.Field TypeSelect the type of field from the available form fields. For Field Types see note 1.Number FormatSelect the format of the numbers that are allowed in this field. You have the option to use a comma or a dot as the decimal separator.RangeEnter the minimum and maximum values for this form field. This will require that the value entered by the user must fall within this range. See note 2.

Field TypesNumberThe Number field type will display as a Number on your form. This option also enables the Number Range property.Drop DownThe Drop Down field type will display as a drop down field on your form. When this option is selected, the General tab will refresh with options to specify multiple quantity choices.HiddenThe Hidden field type will display as a hidden field on your form. This field type is useful when wishing to set a quantity without that quantity being visible or editable by the user.This option is only available when the Number field type is selected.

Merge Tags

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

Usage

{Field Name:2}

Modifiers

This merge tag does not have any modifiers.

Decimal Quantity

Allowing the user to type decimal values in the quantity input field is not supported. However, there is a third-party script that you can use to override this limitation: Enable Decimal Values in Quantity Fields

Decimal values are supported by default when the field is set to Drop Down type. If you』re going to use this field type in a calculation formula, please check the Number Formatting Rules in the Calculations doc page.

Product Field CSS Selectors

Product Field CSS Selectors

ContainerPrice LabelPriceQuantity Input

Container
example: product field container (div) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_singleproduct {border: 1px solid red;}
example: product field container (div) – applies just to form ID #1
1body #gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_singleproduct {border: 1px solid red;}
example: product field container (div) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body #gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_singleproduct {border: 1px solid red;}
Price Label
example: product price label (span) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_singleproduct .ginput_product_price_label {color: red;}
example: product price label (span) – applies just to form ID #1
1body #gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_singleproduct .ginput_product_price_label {color: red;}
example: product price label (span) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body #gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_singleproduct .ginput_product_price_label {color: red;}
Price
example: product price (span) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_singleproduct .ginput_product_price {color: red;}
example: product price (span) – applies just to form ID #1
1body #gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_singleproduct .ginput_product_price {color: red;}
example: product price (span) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body #gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_singleproduct .ginput_product_price input {color: red;}
Quantity Input
example: product field quantity (input) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_singleproduct .ginput_quantity {border: 1px solid red;}
example: product field quantity (input) – applies just to form ID #1
1body #gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_singleproduct .ginput_quantity {border: 1px solid red;}
example: product field quantity (input) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body #gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_singleproduct .ginput_quantity {border: 1px solid red;}

{quiz} Merge Tag

{quiz} Merge Tag

SummaryUsageModifiersNotes

Summary

Displays the specific quiz question along with your answer and the correct answer

Usage

{quiz:id=x}

Modifiers

:id

The ID of the specific quiz question

Notes

Quiz and Survey related merge tags can only be used in confirmations and notifications.For more information, refer to our Quiz Add-On documentation.

{quiz_grade} Merge Tag

{quiz_grade} Merge Tag

SummaryUsageNotes

Summary

Displays the Grade the user achieved based on Letter Grading configured in the Quiz Settings.

Usage

{quiz_grade}

Notes

Quiz and Survey related merge tags can only be used in confirmations and notifications.For more information, refer to our Quiz Add-On documentation.

Product

Product

SummaryCommon SettingsGeneral SettingsField TypePriceDisable Quantity FieldMerge TagsUsageModifiers

Summary

The Product field allows the creation of products in the form. There are several options for the type of field that should be used for the Product Field: Single Product, Drop Down, Radio Buttons, and User Defined Price. It is available under the Pricing Fields section within the form editor.

Product field as displayed in the Field Library

Product field as displayed in the Form Editor.

Important: If you use a choice based field type and 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

Field Type

Select the type of field from the available form fields.

FieldDescriptionSingle ProductThe Single Product field type will display the price and a quantity field by default.Drop DownThe Drop Down field type will display as a drop down field on your form. When this option is selected, the General tab will refresh with options to specify multiple products.Radio ButtonsSimilar to the Drop Down option, but radio buttons instead.User Defined PriceThe User Defined Price field type will display as a single line input on your form.HiddenIf set to Hidden, the product field will not be shown, but will still be processed upon submission.CalculationGenerates product information based on calculations. See this article for an example and the rules on using calculations.

Price

Enter the base price for this product.

Disable Quantity Field

Disables the quantity field. A quantity of 1 will be assumed or you can add a Quantity field to your form from the Pricing Fields.

Merge Tags

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

Usage

{Product Name A (Name):1.1}
{Product Name A (Price):1.2}
{Product Name A (Quantity):1.3}

Modifiers

This merge tag does not have any modifiers.

Quiz Merge Tags

Quiz Merge Tags

List of Quiz Merge TagsWhere are Merge Tags Used?

List of Quiz Merge Tags

The Quiz Add-On introduces several new Gravity Forms Merge Tags that can be used anywhere within Gravity Forms where merge tags are supported.

TagDescription{all_quiz_results}Displays the results of all Quiz Fields that exist in the form.{quiz_score}Displays the total score for the quiz. The score is affected by weighted scoring.{quiz_percent}Displays the percentage score the user achieved. This is affected by weighted scoring.{quiz_grade}Displays the Grade the user achieved based on Letter Grading configured in the Quiz Settings.{quiz_passfail}Displays either Passed or Failed based on the Pass/Fail settings configured in the Quiz Settings.{quiz:id=x}Displays the specific quiz question along with your answer and the correct answer

Where are Merge Tags Used?

Merge Tags can be used:

in form Confirmation messagesin form Notification messages in the Quiz Confirmation messages

{quiz_passfail} Merge Tag

{quiz_passfail} Merge Tag

SummaryUsageNotes

Summary

Displays either Passed or Failed based on the Pass/Fail settings configured in the Quiz Settings.

Usage

{quiz_passfail}

Notes

Quiz and Survey related merge tags can only be used in confirmations and notifications.For more information, refer to our Quiz Add-On documentation.