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,

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[…]