gquiz_incorrect_indicator

gquiz_incorrect_indicator

DescriptionUsageParametersExamplesPlacementSource Code

Description
This filter allows the image used when a user gets an answer incorrect on a quiz to be changed. This allows you to link to your own icon.
Usage
add_filter( 'gquiz_incorrect_indicator', 'gquiz_incorrect_indicator' );

Parameters

$incorrect_answer_indicator_url string
The link to the current image.

Examples
add_filter( 'gquiz_incorrect_indicator', 'gquiz_incorrect_indicator' );
function gquiz_incorrect_indicator ( $incorrect_answer_indicator_url ){
$incorrect_answer_indicator_url = "http://mydomain.com/incorrect.png";
return $incorrect_answer_indicator_url;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFQuiz::init() in gravityformsquiz/class-gf-quiz.php.

gform_zapier_products

gform_zapier_products

DescriptionUsageParametersExamplesPlacementSource Code

Description
The 「gform_zapier_products」 filter allows the products array to be modified before it is sent to Zapier.
Usage
add_filter( 'gform_zapier_products', 'your_function_name', 10, 3 );

Parameters

$products array
An array of product information.

$form Form Object
The form object.

$entry Entry Object
The current entry.

Examples
add_filter( 'gform_zapier_products', 'modify_products', 10, 3 );
function modify_products( $products, $form, $entry ){
$products[] = array(
'product_id' => 'TEST01',
'product_name' => 'Test Product',
'product_quantity' => 2,
'product_price' => 5,
'product_price_with_options' => 5,
'product_subtotal' => 10,
'product_options' => 'Blue'
);
return $products;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFZapier::get_products_array() in gravityformszapier/zapier.php.

Guide to Gravity Forms 2.5 for Theme Developers

Guide to Gravity Forms 2.5 for Theme Developers

Overview of some of the markup changesLegacy ModeColumn LayoutsNew StylesheetsTheme ClassesReady ClassesAccessibilityWhat』s Next

Gravity Forms 2.5 introduces some big changes to our front-end form markup that will have some big impacts on theme developers. We have thoroughly revamped the HTML of our forms, which makes them more accessible and makes them easier to style. This means theme developers will need to make some changes to any custom CSS they write for Gravity Forms.
Overview of some of the markup changes
The markup changes are intended to make forms easier to style and more accessible. Some of the biggest changes you』ll notice are:

We have removed the unordered lists and list items in favor of divs
Fields with multiple inputs, such as Address, are wrapped in fieldsets

In general, we have tried to leave class names as unaffected as possible. We have not removed any class names, although some class names now target slightly different elements. Additionally, we have added some new class names.
Legacy Mode
As with all our Gravity Forms releases, we work hard to try and ensure your existing forms are unaffected whenever possible, so for each form, there is an option to 「enable legacy markup.」 This option lets a form use the pre-2.5 markup instead of the new HTML. When you update a site to Gravity Forms 2.5, all existing forms will automatically use legacy markup, so you don』t have to worry about your form styles breaking when you upgrade. New forms will have the new markup by default, but you can turn on legacy markup if you want to continue to use the old markup. Refer to this article for additional information.
Column Layouts
In 2.5, it is now easy to create column layouts for your forms. In the form editor, you can drag and drop fields into columns, and you can adjust the width of those columns. The column layout is created with CSS grid (with flexbox fallback for IE 11). See to this article for additional information.
New Stylesheets
We have revamped the stylesheets that are loaded with any new form.

basic.css – this stylesheet provides the basic styles that are required for a form to function, such as hiding hidden fields, displaying the password strength indicator and datepicker, making file upload and multi-select fields functional, applying ready classes, applying the grid layout, and resetting fielsets..
theme.css – this stylesheet is more opinionated, and improves the look of the form. It includes the font sizes and weights, vertical spacing between fields, styles for some buttons and the progress bar, styles for validation errors, and everything else that helps make your form look spectacular.

If you want to use your own styles for themes, Gravity Forms 2.5 includes a filter that will prevent theme.css from loading:
add_filter( 'gform_disable_form_theme_css', '__return_true' );
That filter will remove theme.css, but leave basic.css, so that you can easily create your own styles without having to override our styles or recreate form functionality. See this filter reference.
Legacy forms continue to use the same stylesheets they did before 2.5.
Theme Classes
It is possible to embed forms that use new and legacy markup on the same page. Since the two different markup versions use different CSS files, we added theme classes to make sure our CSS targets the correct markup:

.gform_wrapper will target all forms, just as it always has
.gform_wrapper.gravity-theme will target forms with new markup
.gform_wrapper.gform_legacy_markup_wrapper will target forms with legacy markup

Ready Classes
If you』ve been using ready classes to add layout and style to your forms, they will continue to work in 2.5, with a few changes:

The ready classes that are used to put fields in columns are no longer needed, because now you can just drag and drop fields into columns. If you add any of these classes to your fields, Gravity Forms does not actually use them for styling. Instead, we use the same classes to determine their width that we would use if you had resized them in the editor. Eventually we will drop support for these classes.
The gf_inline ready class is no longer supported, because it does not work with CSS grid. The ability to drag fields into columns makes this ready class superfluous.

Accessibility
In 2.5, we have provided the tools to help you make accessible forms that comply to WCAG 2.1 AA. With the amount of flexibility within Gravity Forms, you can still configure forms that are not accessible (accessibility is as much the responsibility of the designer as it is the tools), but you will now see messages within the Form Editor that let you know when you have chosen an option that may present accessibility challenges.
Theme developers will need to pay attention to font sizes and color contrast in order to ensure themes are accessible. We have extensive documentation for designers and developers about forms and accessibility.
What』s Next
The markup changes in 2.5 bring the Gravity Forms product closer to more modern CSS management, and will pave the way for some exciting future changes, such as form themes.

gform_zohocrm_task

gform_zohocrm_task

DescriptionUsageParametersExamplesAppend text to SubjectPlacementSource Code

Description
This filter can be used to modify the task arguments before they are sent to Zoho CRM.
Usage
The following would apply to all feeds:
add_filter( 'gform_zohocrm_task', 'your_function_name', 10, 4 );

To target feeds for a specific form append the form id to the hook name. (format: gform_zohocrm_task_FORMID)
add_filter( 'gform_zohocrm_task_4', 'your_function_name', 10, 4 );

Parameters

$task array
The task arguments are an associative array.
array(
'Due Date' => '2015-10-15',
'Subject' => 'some text',
'Status' => 'Not Started',
'SMOWNERID' => 'The-Zoho-CRM-User-ID-Here',
'CONTACTID' => 'The-Zoho-CRM-Contact-ID-Here'
'SEID' => 'The-Zoho-CRM-Lead-Or-Contact-ID-Here'
'SEMODULE' => 'Leads' /* or Contacts */
)

$feed Feed Object
The feed currently being processed.

$entry Entry Object
The entry currently being processed.

$form Form Object
The form currently being processed.

Examples
Append text to Subject
This example shows how you can append some text to the 『Subject』 argument based on a field value in the Entry Object.
add_filter( 'gform_zohocrm_task_4', 'change_task_argument', 10, 4 );
function change_task_argument( $task, $feed, $entry, $form ) {
if ( rgars( $feed, 'meta/feedName') == 'Zoho CRM Feed 2' && rgar( $entry, '5' ) == 'No' ) {
$task['Subject'] .= ' - some more text';
}

return $task;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
gf_apply_filters( 'gform_zohocrm_task', $form['id'], $task, $feed, $entry, $form )

This filter is located in GFZohoCRM::create_task() in class-gf-zohocrm.php.

Gravity Forms Commitment to Accessibility

Gravity Forms Commitment to Accessibility

Our MotivationGoals we aim for and work onHow accessible are the forms at the moment?Where can I find more information on accessible forms?Accessibility and your WordPress themeBeginning The Improvement ProcessOur RoadmapUser manual and documentationWhat to do if you find an accessibility issue

Our Motivation
「Everyone should be able to use the web and web forms, regardless of device or ability.」
We want everyone to be able to use our forms, and we want site owners to be able to comply with government laws on accessibility, regardless of which country they live in or where they visit a website from. This accessibility statement is to let you know the goals we aim for, the work we have done, and what we are planning to do around accessibility for our Gravity Forms products.
Goals we aim for and work on
We aim for our forms to comply to WCAG 2.1 AA: the Web Content Accessibility Guidelines, version 2.1, level AA.
This is the global standard, and is accepted as the standard for regulation in many countries around the world. For example: WCAG 2.1 AA complies to section 508 (US), the European Accessibility Act and the Equality Act 2010 (UK). For more details about the laws in your own country please check the W3C website Web Accessibility Laws & Policies.
How accessible are the forms at the moment?
How accessible your forms are, depends on how you use the plugin, which options you use and how you select the settings. For example, for every form input you should have a visible label.
No form builder plugin can guarantee compliance to WCAG without having complete control over how the form is implemented.
While we work hard to give site owners and content managers the tools and documentation to create accessible forms, the most important component to accessibility is the site owner!
The site owner is always responsible for the accessibility of the forms on a website.
We will endeavor to provide you forms that give you as much assistance as possible, but in the end, like any content on your website, you, the site owner, are where the buck stops for your visitors and customers.
We also try to continuously update and extend our documentation, to explain what is important and needed.
Where can I find more information on accessible forms?
Here is a list of solid resources on building accessible forms:

Accessibility Guide for Content Providers
Accessibility Guide for Developers
Web Accessibility Tutorials: Forms Concepts
WebAIM: Creating Accessible Forms
WordPress Accessibility Handbook: Web forms

Accessibility and your WordPress theme
The accessibility of Gravity Forms also depends on the WordPress theme you are using. A WordPress theme can override the way the form looks and functions. For example: the color contrast between text and background and the way checkboxes and radio buttons work, can be influenced by custom CSS.
Check your theme documentation, or contact the theme developer, to confirm the safeguards and roadmap they are using to help guarantee the accessibility of the forms on your site.
The WordPress accessibility and ATAG statement describes how accessible WordPress itself is, as an open source software project.
Beginning The Improvement Process
To start our process of improved accessibility, we engaged the digital agency of Level Level in order to get an initial view of what was expected, and the areas that most desired improvement. They partnered us with their senior accessibility consultant Rian Rietveld, who has an excellent reputation in this space.
Rian completed an initial document for discussion around the front-end of our Gravity Forms core plugin in early 2019, taking us through a list of suggested actions and helping us form them into a roadmap. Additionally she provided training for our design and product teams. Her analysis continues, and the process of analysis and feedback is ongoing.
Improving accessibility was one of the focus points of Gravity Forms version 2.4 and 2.5. Non visible changes were made in version 2.4, like:

Screen reader feedback on dynamic changes.
Improved semantics of the form HTML.
Improved color contrast.

And version 2.5 included significant changes to markup, like:

All fields are now wrapped with either a

or a

. We no longer wrap fields in

  • .
    All multi-input fields (such as Address, Name, Checkboxes, etc) are now wrapped in a

    (previously were

    ) for improved accessibility.
    Field labels inside a

    use a

    (previously we used an unconnected