Skip to main content
Participant
February 28, 2018
Answered

PDF Forms- Multi-Selection

  • February 28, 2018
  • 1 reply
  • 19067 views

Hello,

I'm trying to create a form and would like to have the "drop-down" be able to select multipe items; ideally to filter those selections over to a separate text box or area on the form. I realize I need to use the list box option to be able to multi-select. I have two lists that I need to work with (they don't need to correlate with each other). One area has up to 7 selection items and the other has 50+. On the larger one; I'd really like to have it show only the items selected (which may be more visually pleasing in a separate area).

I'm not familiar with writing JavaScript (if that's needed), so am looking for an easy, step-by-step process.

Thank you!

Rachel

Correct answer try67

Can you provide instructions on how to do the easier one- the list box and them populating the selected items in a separate text field; using a script?

Or both?

Thanks!

[Personal email signature removed]


Sure. You can use this code as the custom calculation script of the text field (adjust the name of the list box field in the first line to match the one in your file, of course):

var listBox = this.getField("List Box1");

if (tyepof listBox.value=="string") event.value = listBox.value;

else event.value = listBox.value.join(", ");

1 reply

try67
Community Expert
Community Expert
February 28, 2018

Not possible with a drop-down field. For multiple item selection you need to use a list-box field, or a pop-up menu with check-boxes.

Participant
February 28, 2018

Yes, I understand I can’t do with drop down. Can you elaborate on how to do with the list box or a pop-up menu with check boxes?

try67
Community Expert
Community Expert
February 28, 2018

With a list box you can copy the selected item and show them in a separate text field, using a script.

With a pop-up menu it can also be done, but it's more complicated.