• Skip to primary navigation
  • Skip to content

Neil Curtis

Learn how to make money online

  • Home
  • About
  • Start an Online Business
  • Latest Articles
  • My Resources
  • Contact

How to Fix the Gravity Forms Tab Index Bug

By Neil on August 25, 2015

Like a lot of people I use Gravity Forms in my WordPress website for all sorts of things. Mainly newsletter signup forms but also contact forms.

Click here if you want to know more about Gravity Forms.

If you are experiencing problems when using the TAB key with your Gravity Form then this will hopefully help you out. I noticed that when I hit the TAB key on my keyboard when filling out a Gravity Form on my website that the cursor did not jump to the next field as you’d expect, instead it jumped to a completely different form on the page, and then to the toolbar on my website. This was not good and affects the user experience on my website.

Gravity Forms knows of this issue and states that it is fixed in new versions of their forms software. However I still have this issue. Maybe a recent WordPress update made it happen again?

Anyway, I solved this by pasting the code below into the WordPress child themes functions.php file. Just watch the video if you don’t know how to do this.

Code for functions.php file – just copy & paste at the very bottom.

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

LIKE WHAT YOU’VE READ?
I publish new tutorials all the time so it would be great let you know when something is ready for you to check out. I also have lots more to share with you about how to easily customize and style your WordPress website, so why not join my gang.

TELL ME MORE >>

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2021 · NeilCurtis.me · Website powered by the Genesis Framework and uses the Maker Pro Theme

/* ----------------------------------------- */ /* Content Template: Guides Layout - start */ /* ----------------------------------------- */ #ninetypercent { width: 90%; margin: 0 auto; } #profilebox { border: dashed 2px #ccc; background: #E8E8E8; padding: 10px; padding-bottom: 15px; margin-bottom: 20px; } #profileimage { float: left; max-width: 150px; margin-right: 3%; } #profilebio { font-size: 90%; } #stepfont1 { float: left; font-size: 30px; font-weight: bold; padding: 5px; padding-left: 3%; background: #f96e5b; width: 100%; min-width: 280px; color: #FFFFFF; } #arrow { float: left; } #UWBwrap { padding-top: 10px; border-top: solid 3px #ccc; border-bottom: solid 3px #ccc; } /* ----------------------------------------- */ /* Content Template: Guides Layout - end */ /* ----------------------------------------- */