These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Enter key behavior on PDF forms

tcallen
Registered: Nov 8 2006
Posts: 2
Answered

I have a long PDF form (six pages, probably around 400+ fields) and during testing someone kept hitting the Enter key on their keyboard after completing input on a field. This effectively lost focus from the form and fields and put the user into an uneditable state.

One would expect the Enter key to act like the Tab key in this instance and go to the next field in the tab order but it doesn't. I've seen old posts about this issue on Adobe's site but the "fix" or workaround was to manually code tabbing equivalents based on EVERY form field's onBlur (exit) event. With over 400 fields there is no way I am going to do this. It would make maintaining this form nearly impossible, especially if fields every get moved around.

I know that users *should* use the Tab key to move from field to field, but once this form gets into customers' hands, anything can and does happen. Truth is, some users expect to use the Enter key to move through fields in a form.

Is there any way to trap the pressing of the Enter key and force it to act like the Tab key? Surely there has to be a way. Thanks in advance for any help you can provide.

--Tom

My Product Information:
Acrobat Pro 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Unfortunately there is no better way. If keyboard focus is on a field then the enter key commits data to the field, but it does not put focus on another field. If the enter key is hit again, the same field regains keyboard focus.

It would be nice if this behavior was an option. But it's not and PDF forms have been around for quite a while. I doubt that it will ever change. You could create an automation scirpt to make placing the focus scripts easier. But I suspect this extra code may be more trouble than it is worth.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

tcallen
Registered: Nov 8 2006
Posts: 2
Thanks. I was pretty sure there was no way to change this behavior, but wanted an expert opinion before throwing in the towel.

I didn't realize pressing the Enter key again would re-focus the field. That is good to know. Thanks for your expertise Thom!