Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By pamiller3
#813447
I am making a BPMN dynaform and would like to make a field appear only if another variable is met. This was easy in the past version, but I cannot find it now. Please advice what I am missing.
User avatar
By amosbatto
#813448
There is no condition editor in the new Dynaforms in PM 3.X. You have to use JavaScript code.

Let's say that the ID of your field is "address" and you want it to be displayed if the option is selected with a value of "home_visit" in the "howContact" dropdown.

To make this happen, you need to add the following JavaScript to your Dynaform:
Code: Select all
$("#howContact").setOnchange( function(newValue, oldValue) {
   if (newValue == "home_visit") {
      $("#address").show();
   }
   else {
      $("#address").hide();
   }
});
See:
http://wiki.processmaker.com/3.1/JavaSc ... a_Dynaform
http://wiki.processmaker.com/3.1/JavaSc ... thods#hide
By cpomares
#814297
HI pamiller3,
you can do this adding the following code at the beginning of your javascript code, where "address" is the id of the control you want to hide
Code: Select all
$("#address).hide():
applying this code to Amos example in his previous reply we will have:
Code: Select all
$("#address).hide():
$("#howContact").setOnchange( function(newValue, oldValue) {
   if (newValue == "home_visit") {
      $("#address").show();
   }
   else {
      $("#address").hide();
   }
});


you can also look an example of this at processmaker wiki: http://wiki.processmaker.com/3.2/JavaSc ... etOnchange

Hope you find this helpful, regards
Carlos
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]