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,

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]