Documentation

gform_tabindex

  1. Description
  2. Usage
  3. Parameters
  4. Examples
  5. Placement
  6. Source Code


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


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', '__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