PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Fixing Tab Order on page with multiple forms

  1. Hi guys,

    On my Single Post pages (blog posts) I have two forms (different forms). One on the sidebar and a second one below the post content. The tab order is messed up, when you tab it alternates fields between the two forms (goes from "field 1 on form 1" to "field 2 on form 2" and so on).

    I tried implementing this fix you mentioned in the forum post: http://www.gravityhelp.com/forums/topic/using-tab-key-to-navigate-when-filling-in-form-order-is-wrong

    But once I added the function to my theme's cutom_functions.php file I got a fatal error and had to restore the custom_functions.php file via ftp to revive my blog...

    The URL is http://appeando.com

    I was hoping you could help me solve this tab order issue...

    Thanks and regards!

    Beny Schonfeld

    Posted 13 years ago on Wednesday August 10, 2011 | Permalink
  2. I think I'm missing something. I only see the one form in the sidebar.

    If you're using the default Gravity Forms widget to add forms in the sidebar, you can set the starting tab index on those in the widget options to avoid this issue and not have to use the filter in your functions file.

    Posted 13 years ago on Wednesday August 10, 2011 | Permalink
  3. Haha. Yep you are missing something...

    Navigate to any of my dummy blog posts, you'll see a form on sidebar and one at the bottom of the post.

    I'm not using the Gravity forms sidebar widget. I'm using the gravity forms leaf in Headway (for both forms)

    Thanks!

    Posted 13 years ago on Wednesday August 10, 2011 | Permalink
  4. If setting the tabindex using a filter as outlined in this documentation:

    http://www.gravityhelp.com/documentation/page/Gform_tabindex

    Isn't working then you'll need to discuss this with the Headway support team. That filter should work, so if there is an error it's going to be most likely related to how Headway executes.

    You may need to discuss with them adding a tabindex option to the Headway leaf. It's an option on the Gravity Forms widget to set the starting tabindex. The tabindex is also going to be an option on the shortcode and function call in the v1.6 release to make it easier for people to change without having to use the filter.

    Posted 13 years ago on Wednesday August 10, 2011 | Permalink
  5. Hey Carl,

    I copied and pasted this function from the document you linked to in your reply (into the custom_functions.php file of Headway Theme):

    <?php
    add_filter("gform_tabindex", create_function("", "return false;"));
    ?>

    After saving, and reloading page I got this error:

    "Parse error: syntax error, unexpected '<' in /home8/dontblam/public_html/appeando/wp-content/themes/headway-2012/custom/custom_functions.php on line 35"

    I can restore the custom_functions.php file no problem and get my site going again no problem.

    So next step would be to go through Headway support?

    Thx

    Posted 13 years ago on Wednesday August 10, 2011 | Permalink
  6. Judging by the error, depending on where in custom_functions.php you are placing the code you may not need the opening <?php and the closing ?>. That is most likely the issue.

    Posted 13 years ago on Wednesday August 10, 2011 | Permalink
  7. Thanks Carl! That did the trick.

    At first I tried this (php without the php tags):

    add_filter("gform_tabindex_1", create_function("", "return 10;"));
    
    add_filter("gform_tabindex_2", create_function("", "return 11;"));

    But it did not work at all. So I tried simply disabling the tabindex with the code from your documentation:

    add_filter("gform_tabindex", create_function("", "return false;"));

    That worked perfectly. Fields now tab in the right order no matter what form you're on, or if there's multiple forms on the page.

    Thanks again...
    B

    Posted 13 years ago on Wednesday August 10, 2011 | Permalink

This topic has been resolved and has been closed to new replies.