Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Is highlighting form fields with javascript or CSS supported? Dynamics 365

  • 1.  Is highlighting form fields with javascript or CSS supported? Dynamics 365

    GOLD CONTRIBUTOR
    Posted Mar 05, 2019 10:53 AM
    We would like to highlight form fields on a form. Specifically, when a field is one of our business "key fields" as a visual cue to our users to obtain the information.

    I found these instructions (Coloring Fields in Dynamics CRM 2016 - QuantaCRM)

    document.getElementById("accountnumber_c").style.backgroundColor = "Yellow";

    Is such a method supported? Is there a better way that is supported?

    ------------------------------
    Adam Posegate
    Fox Valley Technical College
    Appleton WI
    ------------------------------


  • 2.  RE: Is highlighting form fields with javascript or CSS supported? Dynamics 365

    GOLD CONTRIBUTOR
    Posted Mar 05, 2019 11:01 AM
    Hello,
    This approach is not supported. Soon all the developers get possibility to build own Custom Control (release of PowerApps Control Framework AKA PCF) and you will get possibility to do something like this using supported methods.

    ------------------------------
    Andrew Butenko
    ------------------------------



  • 3.  RE: Is highlighting form fields with javascript or CSS supported? Dynamics 365

    TOP CONTRIBUTOR
    Posted Mar 06, 2019 12:02 PM
    Edited by Rex Kenley Tan Mar 06, 2019 12:14 PM

    Adam

    Try this.

    1. Set the fields that you want to highlight as recommend using setRequiredLevel.
    2. Add a css file that would look for these "recommend tags" and highlight the next sibling control

    Cheers!



    ------------------------------
    Rex Kenley Tan, MCP
    Tallmadge OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------



  • 4.  RE: Is highlighting form fields with javascript or CSS supported? Dynamics 365

    Posted Mar 07, 2019 02:18 AM
    Hi
    Agreed its not supported, some other options that come to mind that are supported:
    * Use a business process flow to highlight key fields
    * Use a webresource to either display a colour or image next to your fields
    * Use a webresource to summarise the fields you need completed at the top of the form
    * Use form notifications to summarise the fields you need completed

    Hope it helps. Cheers

    ------------------------------
    James Abraham
    Practice Lead, Dynamics
    Empired
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role