Say "Hello!"

  • This field is for validation purposes and should be left unchanged.

Fix Gravity Form Tabindex Conflict WordPress function


1
2
3
4
5
6
7
8
9
10
11
12
<?php
/**
 * Fix Gravity Form Tabindex Conflicts
 * http://gravitywiz.com/fix-gravity-form-tabindex-conflicts/
 */

add_filter( 'gform_tabindex', 'gform_tabindexer', 10, 2 );
function gform_tabindexer( $tab_index, $form = false ) {
    $starting_index = 1000; // if you need a higher tabindex, update this number
    if( $form )
        add_filter( 'gform_tabindex_' . $form['id'], 'gform_tabindexer' );
    return GFCommon::$tab_index >= $starting_index ? GFCommon::$tab_index : $starting_index;
}

Back to Snippets Follow me on GitHub

Ashley Cameron logo
Blog