The below code disable all fields in a form:
function disableFormFields(formContext) {
formContext.ui.controls.forEach(function (control, index) {
var controlType = control.getControlType();
if (controlType != "webresource" && controlType != "subgrid" && controlType != "iframe") {
control.setDisabled(true);
}
});
}
New Comment