Copy link to clipboard
Copied
I have a form that was originally for written communication but it was requested to make it fillable on the computer. I have tried javascript but I haven't been able to make it work. I think because I have multiple form fields but I only want it to auto-tab on 2 of the fields.
This is part of the form. As you can see, I have multiple form fields (and more that are not showing). The only section I was wanting to auto-tab on is the 3 lines for "Note". I know I can change the format to have one text box with the multi-line setting, but I was hoping to keep the form as close to the printed one as possible.
Copy link to clipboard
Copied
Here is a simple script to auto tab to next field once field is 'full' (in field options turn off 'scroll long text')put script in 'Custom keystroke script' of the first 'Note' field and change "Note2" to your actual field name for second note field:
if ( event.fieldFull || event.willCommit )
this.getField("Note2").setFocus();
You can also find more script sample here:
https://acrobatusers.com/forum/forms-acrobat/auto-advancing-form-fields-adobe-acrobat-9-standard/
Copy link to clipboard
Copied
Place this as Document level script:
function tab_next(next_field_name){
if(AFMergeChange(event).length === event.target.charLimit)
this.getField(next_field_name).setFocus();}
Then call a function from custom keystroke script of your fields:
tab_next("field name goes here");
Replace field name goes here with the name of the field you wish to tab to.
Copy link to clipboard
Copied
Here is a simple script to auto tab to next field once field is 'full' (in field options turn off 'scroll long text')put script in 'Custom keystroke script' of the first 'Note' field and change "Note2" to your actual field name for second note field:
if ( event.fieldFull || event.willCommit )
this.getField("Note2").setFocus();
You can also find more script sample here:
https://acrobatusers.com/forum/forms-acrobat/auto-advancing-form-fields-adobe-acrobat-9-standard/
Copy link to clipboard
Copied
I do not know how to "put script in 'Custom keystroke script'.
I was able to turn off 'scroll long text' and I can see where to put a character limit.
I am very new to javascript.
I could not make the other sample work either. I'm not sure what I'm missing.
Copy link to clipboard
Copied
Go to field properties → Format tab, select 'Custom' and then you will see 'Custom keystroke script'.
Copy link to clipboard
Copied
That worked perfectly. Thank you so much for your help!
Copy link to clipboard
Copied
Hello! This was extremely helpful but how do I get it to work without having to press every letter/number twice before it autotabs to the next box? I have the limit for each box set to 1 but each time I try to type the next letter/number my computer "dings" and then it will autotab. Is there a way around the "ding"?
Copy link to clipboard
Copied
Place this as Document level script:
function tab_next(next_field_name){
if(AFMergeChange(event).length === event.target.charLimit)
this.getField(next_field_name).setFocus();}
Then call a function from custom keystroke script of your fields:
tab_next("field name goes here");
Replace field name goes here with the name of the field you wish to tab to.
Copy link to clipboard
Copied
I'm using this to auto advance a line by line paragraph in a document. How do I prevent it from cutting off the last word, or in a sense word wrap to the next line? For example the lines in this image should end with "words" or move the entire word "words" to the next line.

