Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

By JeniferAntony
#825038
Please help me to achieve this. User can select 2 values then the list should be disabled. But at the same time user can de-select the values which is already selected. Then all the options should be available as the length is one.
If the length is equal to 2 then we need to block the selection.
User avatar
By amosbatto
#825082
JeniferAntony wrote: Fri Jun 21, 2019 3:23 am Hello All,
I need to limit the Multi select list box to 2. User could select only 2 values.
Refer the link: https://wiki.processmaker.com/3.0/Dropd ... %20Listbox
Regrads,
Jenifer
I created a programming example to explain this:
https://www.pmusers.com/index.php/Minim ... _a_listbox
User avatar
By amosbatto
#825083
JeniferAntony wrote: Fri Jun 21, 2019 3:26 am Please help me to achieve this. User can select 2 values then the list should be disabled. But at the same time user can de-select the values which is already selected. Then all the options should be available as the length is one.
If the length is equal to 2 then we need to block the selection.
You can disable the listbox with this code:
$("#myListboxId").getControl().prop("disabled", true);

But if you do that, then there is no way to change the selected items. You will have disable individual options in the listbox. Sorry, but I'm already spent an hour preparing the previous example for you so you will have to figure it out on your own.
User avatar
By amosbatto
#825103
Oh, I just noticed that you posted this under ProcessMaker 2. Are you using version 2?
By JeniferAntony
#825116
Hello Amos,

The following solution is working.
Code: Select all
$("#var_Dropdown_Multiselect").setOnchange(function(newVal, oldVal){
    if (newVal.length > 3) {      
    $("#var_Dropdown_Multiselect").setValue(eval(oldVal));
   }  
});
concatenate in grid control

Hi, I have a problem and I will be approciated if […]

Ok, Then, did you ensure that: 1. This requested p[…]

Hello, I'm using ProcessMaker 3.3.10-community, an[…]

SOAP-ERROR: Parsing WSDL

Thanks AJ and Amos, i don't know how to answer Am[…]