Gform tabindex

Description

This filter is executed before the first field is displayed on the form. It can be used to change the tabindex start value or to disable the tabindex attribute.

Usage

Applies to all forms.

<?php

add_filter("gform_tabindex", create_function("", "return 4;"));

?>

Applies to a specific form. In this case, form Id 5.

<?php

add_filter("gform_tabindex_5", create_function("", "return 4;"));

?>

Parameters

$form

(Form Object) The current form.

Examples

This example changes form 10's tabindex start value to 4


<?php
add_filter("gform_tabindex_10", create_function("", "return 4;"));
?>


This example disable tabindex for all forms


<?php
add_filter("gform_tabindex", create_function("", "return false;"));
?>

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in form_display.php

Search the Documentation