I've a Listbox in adobe acrobat pro with following words: Telephone, Computer, Mobile, Notebook, if i select one or more words from the Listbox, the selected word should in a new Texflied for example :
Many thanks for your answer/ help.
You can add a custom calculation script in the text field where you want the multiple selection values of the List Box to be populated into:
// Declare your variables var f = this.getField("myListBox"); var a = f.currentValueIndices; // Get multiple selections from the listbox and copy the values in this field for (var i = 0; i < a.length; i ++) //event.value += "\n"+ f.getItemAt(a[i], false); event.value += f.getItemAt(a[i], false); // Get single or more selections altogether from the listbox and populate this textfield if ((typeof a == "number") && (a ==0)) event.value =""; if (((event.value !=="") || (event.value =="")) && (typeof a == "number")) event.value += "\n"+ f.getItemAt(a, false);
And in the list box field refer to the slide below to see how to setup the listed items and field properties.
When you set it up like this you may make more than one selectin in the listbox by keeping the CTRL key pressed in your keyboard and left-clicking on items with your mouse pointer.
After the selections are made in your listbox, left-click once with the mouse pointer inside or on the text field where you have the custom script, and the values will autopopulate in that field.