locked
How to Disable all Fields on a Form and then Enable just one RRS feed

  • Question

  • I have certain criteria that when a field's status is set to a certain value, I want the whole form to be disabled except for the one field with the status. The following code disables the form but I cannot re-enable the one field! Please help:

    function StatusCheck()
    {
     if (crmForm.all.new_status.DataValue != "1")
     {
       for (var i in crmForm.all)
       {
       var field = crmForm.all[i];
       field.Disabled = true;
       }
     }
     else
     {
       for (var i in crmForm.all)
       {
       var field = crmForm.all[i];
       field.Disabled = false;
       }
     }
     crmForm.all.new_status.disabled = false;
    }

    Tuesday, January 25, 2011 9:04 PM

Answers

All replies