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

After validation error, how to keep focus in field

PetafromOz
Registered: Jun 8 2009
Posts: 230
Answered

I have some fields with validation tests - eg. phone no. fields. If the number is entered in the wrong format, it correctly identifies that and displays the right message, but after the user clicks OK to close the message window, instead of the focus returning to the field in question so it can be corrected, it defaults straight to the next field. At the same time, it seems to allow the incorrect entry to remain there, and there's nothing to stop the user from just continuing regardless, without fixing their error.

How can I ensure that once they get that error message and click OK, that the focus returns to the field in question?

from way... underground at Parkes - central West NSW - Australia

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
I think, that's what you're looking for

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=16536

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

PetafromOz
Registered: Jun 8 2009
Posts: 230
Thanks Radzmar, that sort of works, in that it does the job for the particular field in question. However, the focus just vanishes after that and I have to click into the next field to regain control, instead of it just tabbing to the next field once I've entered the correct data.

Plus when I enter data in the next field and press Tab or click to the next field, it literally wipes out all my fields.

Any ideas?

from way... underground at Parkes - central West NSW - Australia

PetafromOz
Registered: Jun 8 2009
Posts: 230
I now realise the easiest answer for this is:

xfa.host.setFocus(this);

from way... underground at Parkes - central West NSW - Australia