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.
By akshaydange
#786437
Hi friends i am having a problem , i want to disable the textfield called "Renewal Frequency" ,i have two radio button "New Vehicle" & "Existing Vehicle". whenever i select the Compliance Type "Existing Vehicle" the textfield should be disable.

key 1 for "New Vehicle" & key 0 for "Existing Vehicle"

The following is my code -tell me where i went wrong

function checkComplianceFor() {
if( $('#complianceType').getValue() == 0 ){

$("#renewalFrequency").disabled = true;

} else {

$("#renewalFrequency").disabled = false;

}
}
$('#complianceType').setOnchange(checkComplianceFor);
User avatar
By giovani
#786438
Hi akshaydange,

You should use the getControl() function, in order to select the Dynaform control inner HTML element, and the proper way to disable it is using prop().
So, your code should look like:
Code: Select all
function checkComplianceFor() { 
  if( $('#complianceType').getValue() == 0 ){ 

 	 $("#renewalFrequency").getControl().prop('disabled', true);

  } else {

 	 $("#renewalFrequency").getControl().prop('disabled', false);

  }
}

$('#complianceType').setOnchange(checkComplianceFor);
I hope you'll find this example useful.

Regards,

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

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