locked
How to change the font size of label in the forms of dynamics crm? RRS feed

  • Question

  • hi,

    I have following functions to change the font size of the label of a filed.

    function fontW()
    {
    crmForm.all.new_lastname.style.fontWeight = "bold"; // to make the text in bold
    }
    and the second one is:
    function fontChange()
    {
    var label = Xrm.Page.getControl("eogapt_name").getLabel();
    label.style.fontSize = "16px";
    }
    But both seems to no effect at all.

    Please I'll like your kind suggestions and help at all.

    Thank You.

    Regards.

    Wednesday, November 6, 2013 10:38 AM

All replies

  • Could you try with pt instead px. something like this.

    function fontChange()
    {
    var label = Xrm.Page.getControl("eogapt_name").getLabel();
    label.style.fontSize = "16pt";
    }

    Friday, November 8, 2013 8:21 PM
  • Hi,
    you didn't specify which CRM version you have, however changing the font size is an unsupported customization.

    If you want still to proceed, you need to find the id name of the label you want to customize and get the object with a document.getElementById. However I repeat is an unsupported customization and future rollup can break your code.


    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by MubasherSharif Tuesday, November 26, 2013 9:28 AM
    Friday, November 8, 2013 10:18 PM