Expand my Community achievements bar.

Copy text from multiple fields to one field

Avatar

Level 2

I would like to copy text from multiple fields into one field. Each of these smaller fields will only be allowed to have one character. The larger field will not be able to be edited.

So far, I have thought of creating a naming heirarchy for these fields. I was going to then call upon the array of the parent and set the value of the parent to equal this array.

var parent = this.getField("everything");
var array = everything.getArray();
var v;
for(parent=0; parent<array.length; parent++)
{

v = a + " " + v;               //Im guessing this line is incorrect
parent.value = a;
}

Any suggestions? or a better way of doing this.

Thanks

4 Replies

Avatar

Level 2

parent.value should be outside of the for loop

Avatar

Former Community Member

Did you build this form in Designer or Acrobat?

Paul

Avatar

Former Community Member

The code sample you provided is using AcroForm scripting and will not work in this form. There is another post similar to this one...have a look at this one it might help you out. It is doing the opposite of what you want but the concept of the loop and how each field is addressed inside ofthe loop is what you wil need.

http://forums.adobe.com/message/2954517#2954517

Paul