Hi,
When you set a field to be read only in entity form editor, it is not possible to set any values to it even through Javascript apart from front-end, in such cases we may consider an option not to keep it Read Only and just enable-disable it in Form Load and Form Save scripts.
But going for a temporary solution has its cons, the way a field appears when it is Readonly and when it is disabled are different, disabled field looks grey, while readonly looks white, just like another editable field.
But there is a way to keep it read only and still able to set value to it, just after you set value to the readonly field in your script, turn the ForceSubmit property on:
crmForm.all.field.DataValue = "some value";
crmForm.all.field.ForceSubmit = true;
When you set a field to be read only in entity form editor, it is not possible to set any values to it even through Javascript apart from front-end, in such cases we may consider an option not to keep it Read Only and just enable-disable it in Form Load and Form Save scripts.
But going for a temporary solution has its cons, the way a field appears when it is Readonly and when it is disabled are different, disabled field looks grey, while readonly looks white, just like another editable field.
But there is a way to keep it read only and still able to set value to it, just after you set value to the readonly field in your script, turn the ForceSubmit property on:
crmForm.all.field
crmForm.all.field
Comments