Javascript to autofill text fields
I want to be able to type a word in one text field and have several others auto populate with the letters of that word. For example, I want to type the word "christmas" in the text field "word1" and have a script turn the string into an array and autofill text field "word1a" with the letter "c", "word1b" with the letter "h", etc..
Is this possible with the javascript installed in acrobat? Would the file built in Acrobat DC be able to be filled in by someone else on another computer with only Reader.
I know this is possible with javascript, just not sure how to make it work with Acrobat.
What I have been trying is (which does not work):
var w1=this.getField('word1');
var w1a=this.getField('word1a');
w1a.value=w1.charAt(0);
I have also tried to convert the string into an array, but have not had any luck. Is this something that would be done in the Document Javascripts or can you do it in the "custom calculations scripts" for the text field.
I have been able type each letter in a text field and add them together to form the word, so that is a work around I I can not get the javascript to work to split the word apart.
