Another newbee question I'm afraid!
I want to position the cursor in a text field when a user opens the form. I can't find a way to do it but I'm pretty sure it's straightforward!
Also, can I remove fields from the tab order?
Thanks (for your help and patience!)
You would select the object that you want to receive focus and put the following in the docReady event.
The docReady event is a good one to use, because it only fires once.
The tab order can be set in the Tab Order tab. Depending on the version of LC Designer that you have, the flexibility will vary. However I would do this as a last step, as any changes can throw the tab order out of sequence.
Note that tab order is greatly affected by the relevant x/y coordinates of objects and where objects are in separate subforms.
Hope this helps,
Sorry to rain on the parade but in this circumstance that will not work. The issue has to do with how and when XFA commands and objects are available to Acrobat. The cursor is controlled by teh Acrobat layer and until the form is ready (handed to the user) Acrobat does not know about the XFA objects. So
you will have to use an Acrobat command and reference th efield by means of an AcroForm structure to Accomplish this. I have included a sample that shows how to do it. This was certainly the case in version 8 (I have not touched this since then ...so if I am wrong please update this thread)
Here is a version with the setFocus: https://acrobat.com/#d=2zbOAEq3AHzxSWexle0PQA
I can only test back to Reader v8.2 at the moment. I would have thought that the docReady event would have been firing late enough in the render process to work. I will try and test some more.
Tim, Paul raises a very valid point - you should test back to the version of Acrobat/Reader that your users will be using.
Sorry to be a nuisance!