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.

Do not want to tab to next form on a page, stop at submit for each form.

  1. I search all threads, documentation etc. and found how to get tab indexing to work correctly if you want to tab through from one form to the other, but in my case I do not want the tab indexing to jump to the next form, just stop at the submit. So in essence you must click on a field in that form to tab through it, and it stops at the submit. I can't find any jQuery to accomplish this either. It may be a focus control?

    Posted 6 years ago on Tuesday August 7, 2012 | Permalink
  2. David Peralty
    Administrator

    That is not how tabindex works. Tabindex goes through every element, not just form elements and moves through them for people that can't/won't use a mouse. You can't make it stop at any place.

    Posted 6 years ago on Tuesday August 7, 2012 | Permalink
  3. I understand tabindex. Are you familiar with a way to stop tabbing from moving to the next form on a page say at the submit button. I don't want tabbing to jump to the next form. I've put 3 forms in coda slider panels, and when it tabs to the next form it totally screws up the sliders panel line up. Trying to do a cool user "select which form" they need on a single page type of thing.
    I understand if this is outside of scope. I would definitely share such an accomplishment with others.
    Check it out: http://gondolaskate.com/ace-hardware/
    password: password

    Posted 6 years ago on Tuesday August 7, 2012 | Permalink
  4. Not sure if this is an option, but you could use this filter to change/disable tabbing on certain forms - but I don't know about "stopping" it in certain places. I have never tried that before.

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

    Posted 6 years ago on Tuesday August 7, 2012 | Permalink
  5. None of those will stop tabbing to the next form on the page.
    Maybe disabling the tabindex to the submit button to -1 so the tabbing just stops tabbing on the focused form?

    Posted 6 years ago on Tuesday August 7, 2012 | Permalink
  6. I tried to use something like this: $("input #gform_submit_button_5").attr("tabindex", "-1");
    to disable tabbing to the Submit button thereby stopping the tabbing to the next form, but it still tabbed. Running out of ideas.
    Link:
    http://gondolaskate.com/ace-hardware/
    password: password

    Posted 6 years ago on Wednesday August 8, 2012 | Permalink
  7. For anyone with multiple forms on a page on in a slider like the coda slider, here is a fix if you do NOT want the tabbing to go to the next form. Enter button still work for Submit so it's still accessible.
    JS:

    $(document).ready(function(evt){
    
    $('.gform_button').live('keydown', function(evt){
        if(evt.keyCode === 9){
            evt.preventDefault();
    
            var form = $(this).closest('form');
            var input = $('input:first', form);
    
            if(input !== undefined){
                input.focus();
            }
        }
    });
    });
    Posted 6 years ago on Wednesday August 8, 2012 | Permalink
  8. Thank you for posting your code.

    Posted 6 years ago on Thursday August 9, 2012 | Permalink

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