Copy link to clipboard
Copied
Hello all..
I'm stuck and have been searching for a solution. I have a list box of 30 names. The user needs to select between 3 to 5 names. I am trying to get these names populated in a text box to the right of the list box. I can't find a solution for this and hope someone out there might have an idea. I've tried some JS scripts found here but none have worked so far.
Hope to hear from someone soon.
You can use this code as the custom calculation script of the text field (just adjust the field name in the first line):
var v = this.getField("List Box1").value;
if (typeof v=="object") event.value = v.join(", ");
else event.value = v;
Copy link to clipboard
Copied
First, this will require custom JavaScript to accomplish. Do you know how to write JavaScript within an Acrobat form?
See
Copy link to clipboard
Copied
Thanks;
I have a bit of experience modifying JS. I was hoping there might be some scripts that are similar to what I want to do and use that as a base.
The scripts I have seen so far don't seem to be what I am after. Basically, a user selects 3-5 items from the list box and these items get populated in a text box next to it. That's all I'm looking for.
Thanks
Copy link to clipboard
Copied
Anyone have an idea or a similar script I can compare?
Copy link to clipboard
Copied
You can use this code as the custom calculation script of the text field (just adjust the field name in the first line):
var v = this.getField("List Box1").value;
if (typeof v=="object") event.value = v.join(", ");
else event.value = v;
Copy link to clipboard
Copied
TRY67,
Another beginner here. Please forgive my Javascript ignorance. I have a one off form to make with multiple selected states. I made a list box of the states but can't seem to get them to the text box. Where exactly does this code go? I have been trying to accomplish the same thing and I am sure I am putting the javascript or the list box/text box names in the wrong place.
Thanks,
Joe
Copy link to clipboard
Copied
Brilliant try67​
That was the simplest and most effective solution found. Greatly appreciate your help.
Copy link to clipboard
Copied
Thanks try67!!!!! I'm new to making PDF Fillable forms.
Your response worked perfectly for me!!!!