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

How do I create a list box thats dependant upon a drop down?

New Here ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

I'm trying to create a menu selection with a drop down option and then based upon the option selcted create a list box where the user can pick multiple options.

EX: 

Menu Item 1 has 6 options that goes with it, but I want the user to be able to select to 3

Menu Item 2 has 3 options, but I want the user to only be able to select 1

TOPICS
Create PDFs , Edit and convert PDFs

Views

567

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Nov 23, 2022 Nov 23, 2022

Hi,

Here it is if I understood correctly!
In custom keystroke script you write:

if (!event.willCommit) {
	switch (event.changeEx) {
		case "1":
			var theList=["item 11","item 12","item 13","item 14","item 15","item 16"];
			break;
		case "2":
			var theList=["item 21","item 22","item 23","item 24","item 25","item 26"];
			break;
		case "3":
			var theList=[["item 31",31],["item 32",32],["item 33",33],["item 34",34],["item 35",35],["item 36",36]];
			break;
		default:
			var theList=[""];
	}
	thi
...

Votes

Translate

Translate
Community Expert ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

LATEST

Hi,

Here it is if I understood correctly!
In custom keystroke script you write:

if (!event.willCommit) {
	switch (event.changeEx) {
		case "1":
			var theList=["item 11","item 12","item 13","item 14","item 15","item 16"];
			break;
		case "2":
			var theList=["item 21","item 22","item 23","item 24","item 25","item 26"];
			break;
		case "3":
			var theList=[["item 31",31],["item 32",32],["item 33",33],["item 34",34],["item 35",35],["item 36",36]];
			break;
		default:
			var theList=[""];
	}
	this.getField("listBox").setItems(theList);
}

If you need export values for items of the list box you will write theList array as in case 3 else write it as in case 1 or 2.

@+

Votes

Translate

Translate

Report

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