Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
User avatar
By amosbatto
#824291
If you set the datasource property of the dropdown to "array variable", then in your trigger, you can eliminate options from the array variable which is used to populate the dropdown's list.
Code: Select all
@=myDropdownList = array(
   array('value1', 'label1'),
   array('value2', 'label2'),
   array('value3', 'label3'),
);
//eliminate second option:
unset(@=myDropdownList[1]);

See: https://wiki.processmaker.com/3.0/DynaF ... iable[code]

If you want the option to appear in the dropdown box, but it is disabled (ie, grayed out), you will need to use JavaScript like this:
Code: Select all
$("#selectColor").find("option[value='red']").prop("disabled", true);
where "selectColor" is the dropdown's ID and "red" is the value of one of its options.

Or you can use this code to disable the second option in the list:
Code: Select all
$("#selectColor").find("option").eq(1).prop("disabled", true);
If you want to remove options from the list, then see:
https://www.pmusers.com/index.php/Chang ... tions_list

Nice post and please provide more information. Tha[…]

The step by step guide to convert MBOX files to P[…]

Starting a business in a white-label NFT marketpla[…]

Well if you are a startup who has a dream to build[…]