kwizcom.ModernUILibrary.FormPage.OnButtonClick("buttonclick", function (form) { /*do not edit above*/ if (form.context.pageType === 4) return;//only work on new/edit item form //=~=~ Update the names of the fields that you want to disable here =~=~ var fieldsToDisable = ["Cascading"]; //=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ //disable all fields try { let fieldsState = {}; fieldsToDisable.forEach(function (fieldName) { fieldsState[fieldName] = { disabled: false, preventUndo: false }; }); form.SetFieldsState(fieldsState); } catch (err) { alert(err.message); return; } /*do not edit below*/ });