C
|
copper21 11/28/2013 |
You can do this in the Javascript Onload event. |
I
|
ianhols author 12/1/2013 |
You can do this in the Javascript Onload event. It would look something like this: Make sure to make the field writeable in the "edit as" tab if you double click on the field on the page; don't make it readonly. Javascript Onload event in the events section of the page you want to do this with. //Create Variables and Get Values var DropDown = Runner.getControl(pageid, 'DropDownFieldName'); var DisableField = Runner.getControl(pageid, 'FieldToBeDisabled'); //Disable Field to Start DisableField.setDisabled(); DisableField.removeValidation("IsRequired"); //Enable Field if "SOMETHING" is chosen from drop down box DropDown.on('change', function (e){ if(this.getValue() == 'SOMETHING'){ DisableField.setEnabled(); DisableField.addValidation("IsRequired"); }}); //Disable field if something other than "Something" is chosen from the drop down field DropDown.on('change', function (e){ if(this.getValue() != 'SOMETHING'){ DisableField.setDisabled(); DisableField.removeValidation("IsRequired"); }}); This will automatically disable the field you want disabled and if "Something" is chosen from the drop down menu, it will enable the field. It will also add a validation to make it a required field if it is enabled. Remember to replace "DropDownFieldName" and "FieldToBeDisabled" with the name of your fields in the form. Brian
|
![]() |
Sergey Kornilov admin 12/1/2013 |
Ian, |