16 Feb
Posted by: mitch in: Customization, Dynamics CRM
The labels for data entry fields on CRM 3.0 forms can normally only be set to the following values: Normal, Hidden, or Disabled. Not a whole lot of functionality there should you wish to get inventive ( or at least, more descriptive ) with your forms.
Using a bit of JavaScript in the Form's OnLoad event, you can alter the labels in a variety of ways.
Changing the Weight of the font ( how dark it is ):
crmForm.all.[field name]_c.style.fontWeight = 'bold';
Possible values:
normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
Changing the Font Style:
crmForm.all.[field name]_c.style.fontStyle = 'italic';
Possible Values:
normal, italic, oblique
Changing the Background Color:
crmForm.all.[field name]_c.style.backgroundColor = 'green';
Possible Values:
Named or value color
Changing the Font Color:
crmForm.all.[field name]_c.style.color = 'green';
Possible Values:
Named or value color
Other style elements do exist, but to keep in mind that your changes do not need to vary the CRM user experience too much.
References:
Hiding a Form Field Label in MSCRM 3.0
One Response
uma_natarajan
12|Dec|2007 1I used
crmForm.all.[field name]_c.style.color = 'green';
in forms onload event. but i got "crmForm.all.[field name]_c.style" is null or it's not an object error.
What did i miss?.
Thanks for helping
Leave a reply