Forked from spivurno/gw-gravity-form-tabindex-fix.php
Created
March 25, 2016 15:50
-
-
Save marisqaporter/f4264f34ffffaf493da2 to your computer and use it in GitHub Desktop.
Gravity Wiz // Fix Gravity Form Tabindex Conflicts ~ http://gravitywiz.com/fix-gravity-form-tabindex-conflicts/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment