In order to disable the entire form you need to disable each and every control.
function OnCrmPageLoad()
{
ToggleFormFields(true);
}
function ToggleFormFields( disable )
{
for( var i = 0 ; i < crmForm.all.length ; i++ )
{
if( crmForm.all[ i ].req )
crmForm.all[ i ].Disabled = disable;
}
}
OnCrmPageLoad();
3 comments:
Excelente !!!
What is the meaning of .req here??
Hi Nitesh,
.req is the CRM-internal property for the RequirementLevel of the field. Here it is only used to filter out all elements of crmForm.all which dont have this property, because they are no entity-attributes (form-fields).
e.g. the tabs of the form are also elements of crmForm.all but should not be disabled here, cause this are no fields.
Regards
Thomas
Post a Comment