Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

record 10 Dropdown selections

New Here ,
Nov 21, 2016 Nov 21, 2016

How to record the selection from a dropdown for up to 10 selections

TOPICS
Acrobat SDK and JavaScript , Windows
459
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 21, 2016 Nov 21, 2016

So I have one drop down that I need to enter as a string to a text field, 10 selections from the Dropdown

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2016 Nov 22, 2016

Please elaborate. It sounds like you want to have a dropdown that can have up to 10 items selected. That's not possible, dropdowns can have only one item selected.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 22, 2016 Nov 22, 2016

You need a list field with the multiple selections option enablied, then you need a cust script to join or concatinate the choicies.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 22, 2016 Nov 22, 2016

I have one Drop down with 127 items and I need to record the 10 selections from that single dropdown each time a new Dropdown is selected into another text field (join or concatenate)

Dropdown is Called "CC" and the field is "CareeerPaths"

selection1 + ", " + selection2 + ", " + selection3 etc....

I'm thinking that the code can be done with a counter (var i = 1; i<11; i++) { do something;}

if(event.willCommit){if(event.value == "") this.resetForm (["CareeerPaths"]);

else SetCareerPathsFieldValues(event.value);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 23, 2016 Nov 23, 2016

Have you tried your script on your form?

What was the result?

As far as I know a "drop box" or "combobox" field type does not support multiple selections.

DropdownBoxOptions.jpg

The "Select multiple" option is only available using the "List Box" field.

ListboxOptions.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2016 Nov 23, 2016
LATEST

One thing you might consider in order to use the dropdown as you describe is that for each selection from the dropdown a script will append the current selection to the text field and using a comma as a delimiter between "items" AND delete that item from the dropdown. You'd then need an event on the text field to repopulate the dropdown in case the user deletes something something from the text field.

If that sounds like what you want, the script is pretty simple.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines