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

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]

Betvisa clone scripts are pre-built software solut[…]