You are viewing limited content. For full access, please sign in.

Question

Question

Tabbing to the submit button and using enter key to submit?

asked on May 28, 2014 Show version history

My data entry users would like to be able to work through a form using keyboard only.

 

At present the Submit button on our published form doesn't accept focus when attempting to tab down to it from the last form field. This means the users can't submit the form using the enter key. 

 

It appears through testing that the browser is capable of this behavior, it's just not working on the Laserfiche Forms.

 

Can anyone explain to me how I can allow the Submit button to accept focus when tabbed to? 

 

Sorry if this is a silly question and I've missed something obvious. 

 

edited to add: using the enter key alone isn't working either (as that wasn't apparent from my initial post)

0 0

Answer

SELECTED ANSWER
replied on May 29, 2014 Show version history

The following JavaScript function should let you attach an event that catches the Enter key being hit anywhere inside a named DIV, or you could change the selector to make it work on any element you want.

        $("#BasicSearchForm").keypress(function (e) {
            if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
                BasicSearch_Click();
                return false;
            } else {
                return true;
            }
        });

 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.