Skip to content

Instantly share code, notes, and snippets.

@sagarjadhav
Created September 15, 2017 03:54
Show Gist options
  • Save sagarjadhav/f017e351c0aaa2fe665075dd096499fb to your computer and use it in GitHub Desktop.
Save sagarjadhav/f017e351c0aaa2fe665075dd096499fb to your computer and use it in GitHub Desktop.
Fix Gravity Form Tabindex Conflicts
<?php
/**
* Fix Gravity Form Tabindex Conflicts
*/
if ( !function_exists( 'gform_tabindexer' ) ) {
function gform_tabindexer( $tab_index, $form = false ) {
$starting_index = 1000;
if ( $form ) {
add_filter( 'gform_tabindex_' . $form[ 'id' ], 'gform_tabindexer' );
}
return GFCommon::$tab_index >= $starting_index ? GFCommon::$tab_index : $starting_index;
}
add_filter( 'gform_tabindex', 'gform_tabindexer', 10, 2 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment