Matt Pring
2010-07-08 03:06:26 UTC
Hi all, I am currently trying to create an OnLoad event which disables a
number of fields when a selected field (tick box) is ticked/true/yes.
Eg; If Field1 has previously been ticked on record, then disable these fields.
I am currently using the below script but this seems to either not work or
cause other events not to fire ... probably a simple error but I'm missing
something ...
Below is the script so far ...
if (crmForm.Field1name.DataValue = true)
{
crmForm.all.FirstName.Disabled = true;
crmForm.all.LastName.Disabled = true;
crmForm.all.Address.Disabled = true;
crmForm.all.JobTitle.Disabled = true;
}
When I run this, the tickbox field automatically gets ticked when loading
the record.
I have also tried using OnChange but the fields become unlocked again when
re-opening the record.
Can anyone help here?
number of fields when a selected field (tick box) is ticked/true/yes.
Eg; If Field1 has previously been ticked on record, then disable these fields.
I am currently using the below script but this seems to either not work or
cause other events not to fire ... probably a simple error but I'm missing
something ...
Below is the script so far ...
if (crmForm.Field1name.DataValue = true)
{
crmForm.all.FirstName.Disabled = true;
crmForm.all.LastName.Disabled = true;
crmForm.all.Address.Disabled = true;
crmForm.all.JobTitle.Disabled = true;
}
When I run this, the tickbox field automatically gets ticked when loading
the record.
I have also tried using OnChange but the fields become unlocked again when
re-opening the record.
Can anyone help here?
--
Matt Pring
Matt Pring