I currently have a question with 2 dedicated text fields (view example below)
Question? _______________________ <(Comments.1)
_______________________________ <(Comments.2)
I need to be able to type into Comments.1 and have the text flow into Comments.2 and also have the ability to backspace back into Comments.1.
I was able to setup text flow from Comments.1 to Comments.2 with the scripting below placed into the Keystroke Script field for Comments.1's Format Properties.
if(event.fieldFull)
this.getField("Comments.2").setFocus();
But I am unable to backspace from Comments.2 to Comments.1.
Does anyone know the script? Thanks in advance for the help!
Use the selection, change, and value properties of the event object to build the new text string that will be entered on completion of the event. If the string is empty, move focus to the previous field.
Unfortunately you cannot easily detect the situation where both fields contain data and characters are removed from the first field. In this situation you might want to transfer characters from the second field to the first, making both fields look and behave as one field. Depending on how far you want to take this, it can get messy.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script