Ashley Cameron Design

Ashley Cameron Design

Shop the Creative Design Market

Good morning

Fix Gravity Form Tabindex Conflict WordPress function

SnippetsWordPress

About a 1 minute read

"Design is not just what it looks like and feels like. Design is how it works."

Steve Jobs


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