Answered by:
Font style in CRM forms

Question
-
Hi All,
I want some parts of the forms font in italic syle. Is it possible in CRM 4.0. Can any one tell me how to achieve this in case if it is possible.
Thanks,
Laxmikanth D.
- Edited by Vikram96 Tuesday, February 1, 2011 5:37 PM clear text
Tuesday, February 1, 2011 5:36 PM
Answers
-
It is possible, you may try this:
crmForm.all.new_myfield_c.style.fontStyle="italic";
Note that I had "_c" suffix after the CRM field name.
Hope it helps.
Daniel Cai | http://danielcai.blogspot.com- Proposed as answer by Andrii ButenkoMVP, Moderator Tuesday, February 1, 2011 7:24 PM
- Proposed as answer by DavidBerryMVP, Moderator Tuesday, February 1, 2011 9:40 PM
- Marked as answer by Vikram96 Wednesday, February 2, 2011 6:28 AM
Tuesday, February 1, 2011 5:58 PM -
For Labels
crmForm.all.new_3passport_c.style.fontStyle = 'italic';
crmForm.all.new_3passport_c.style.fontSize = '11px';
crmForm.all.new_3passport_c.style.fontWeight= 'bold' ;For Data Fields
crmForm.all.new_3passport.style.fontStyle = 'italic';
crmForm.all.new_3passport.style.fontSize = '11px';
crmForm.all.new_3passport.style.fontWeight= 'bold' ;You will either have to do this for each field or you can also use loop for the whole form.
Regards Faisal- Marked as answer by Vikram96 Wednesday, February 2, 2011 6:28 AM
Tuesday, February 1, 2011 6:24 PM
All replies
-
It is possible, you may try this:
crmForm.all.new_myfield_c.style.fontStyle="italic";
Note that I had "_c" suffix after the CRM field name.
Hope it helps.
Daniel Cai | http://danielcai.blogspot.com- Proposed as answer by Andrii ButenkoMVP, Moderator Tuesday, February 1, 2011 7:24 PM
- Proposed as answer by DavidBerryMVP, Moderator Tuesday, February 1, 2011 9:40 PM
- Marked as answer by Vikram96 Wednesday, February 2, 2011 6:28 AM
Tuesday, February 1, 2011 5:58 PM -
For Labels
crmForm.all.new_3passport_c.style.fontStyle = 'italic';
crmForm.all.new_3passport_c.style.fontSize = '11px';
crmForm.all.new_3passport_c.style.fontWeight= 'bold' ;For Data Fields
crmForm.all.new_3passport.style.fontStyle = 'italic';
crmForm.all.new_3passport.style.fontSize = '11px';
crmForm.all.new_3passport.style.fontWeight= 'bold' ;You will either have to do this for each field or you can also use loop for the whole form.
Regards Faisal- Marked as answer by Vikram96 Wednesday, February 2, 2011 6:28 AM
Tuesday, February 1, 2011 6:24 PM -
Thanks Daniel and Faisal.
How about the font style for application navigation pane, application tool bar, entity navigation pane etc etc. All those thing which we customise using the SiteMap and ISV Config files. Should we include any style tag in the xml's??
Wednesday, February 2, 2011 6:28 AM -
Almost anything in CRM form can be manipulated through DOM though it is usually considered not supported. At the same time, making such small changes usually has no harm to the application, so it's still OK from development practice.
Unfortunately neither sitemap nor ISV.config supports styling. The reason is CRM tries to provide a consistent UI, both of them are not designed for styling. But nothing prohibits you from changing an HTML element's style through CRM form script.
Daniel Cai | http://danielcai.blogspot.comWednesday, February 2, 2011 2:20 PM