Skip to main content

Tab key not working properly in gravity forms

Have you embedded a gravity form onto your page in WordPress and noticed that when you hit the tab key, it doesn’t tab down to the next field as it should? It may be conflicting with another form on your page. To fix this, enter this code into your functions.php and press save.

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;

After implenting this piece of code, you should be able to tab properly through your Gravity form without any problems.

Leave a Reply