Discussion about developing the ProcessMaker application and suggestions for improving it
#828820
Hi guys,

I am looking for a code to hide or unhide a radio button based on a dropdown values.
For example:
There are 2 radio button, radio1 and radio2.
There is a dropdown that is named type and has 2 values, "ok" or "not ok"
If "ok" from dropdown selected then radio1 appears and radio2 disappear and if "not ok" selected then radio2 appear and radio1 disappear.
What is the code in JavaScript?
Thanks for your consideration.
#828827
Hi,

Please test below is what you want:
Code: Select all
//== test select myDropdown to "ok" than disable/hide/show myRadio
$("#myDropdown").setOnchange(function(newVal, oldVal){     //put your id/var  to replace myDropdown
	if (newVal === "ok") {
      //$("#myRadio").getControl().attr("disabled", true);      //put your id/var to replace myRadio
      $("#myRadio").show();
    }else{
      //$("#myRadio").getControl().attr("disabled", false);
      $("#myRadio").hide();
    }
})
What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]

To convert MBOX to PST, start by downloading and i[…]

My Assignment Services stands out as one of the be[…]

Erectile Dysfunction, commonly known as impotence,[…]