Ashley Cameron Design

Ashley Cameron Design

Shop the Creative Design Market

Goodnight

Fix Gravity Form Tabindex Conflict WordPress function

SnippetsWordPress

About a 1 minute read

"The passion that we seek is within every experience; we just have to find it."

Ashley N Cameron


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;
}