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

Circular Tabbing

Dripto
Registered: Jun 20 2007
Posts: 47

How do I write a script that will cirulate within a few fields?

So say I want to tab from textField1 to textField2 and then to textField3 and finally to textfield4 I hit the TAB key each time but what I need is if I hit ENTER in textField3, I want to return to textField1. Could somebody please assist me with the code for this? I have tried using event.keyCode but that doesn't exist in Forms Designer dropdowns options and if I use it anyway it doesn't work.

Please advise.

Thanks.

My Product Information:
LiveCycle Designer, Windows
oksana77
Registered: Apr 24 2009
Posts: 89
You can use xfa.host.setFocus(Textfield2) on full event of Textfield1. However, I noticed it will delete the last character of the textfield1 or the first one of Textfield2.
You can also use setFocus on change event. It really depends on the number of characters in the field (it is better when it is fixed and you can determine that).
Dripto
Registered: Jun 20 2007
Posts: 47
I think I can use that script but I need to add an if then statement to indicate that I want to execute that script when the user hits the ENTER button. The field is actually a decimal field to enter dollar values not phone numbers, credit card numbers etc. so it has to be when ENTER is pressed, not when exited or full.

Thanks for your response.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
You can control the Tab order with the setFocus parameter in the exit event of the text fields

Form1.#subform[0].Textfield3::exit - (JavaScript, client) event.rc = false;xfa.host.setFocus(Textfield1);

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs