web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

HTML Web Resource Label (as a Required Field)

(0) ShareShare
ReportReport
Posted on by

I have an HTML Web Resource inserted into a CRM form, I wish to indicate that it is a required field, hence I appended "*" in the label.  

But how to change the color of "*" to Red?  It is the CRM form standard for a required field.

 

Regards

Tiong

*This post is locked for comments

I have the same question (0)
  • Verified answer
    mscrmba Profile Picture
    on at

    Hi Tiong,

    I think you'd need to alter your HTML script.  You may want to have 2 labels - one that is the 'labelname' and one that is '*' and 'colour' each separately.

    Try this link:

    stackoverflow.com/.../how-do-i-set-the-colour-of-a-label-coloured-text-in-java

    Background information - not likely to be of help to you:

    If normal Jscript did work for you on load of the CRM form (which I suspect it won't) then this used to work (in earlier versions - so you could give it a go but it would likely change the colour of the whole label not just the asterix and would also be an unsupported change):

    *  A blog on how to do coloured text entry in CRM:  dynamicsofdynamicscrm.wordpress.com/.../change-color-for-text-fields-dynamics-crm-2013  You'll need to read through this but David found that this Jscript on load of form worked for him:

    $(“#name_c”).find(“span”).css(“color”, “red”); (for the label)

    $(“#name”).find(“span”).css(“color”, “red”); (for the value)

    *  This blog provides details for CRM 2011 on colouring the background of a label, field text value, the label text and the background of the field value using Jscript.  Similar code may work for CRM 2015.  sumedha8.blogspot.com.au/.../change-colour-of-fonts-sections-and-tabs.html

  • Community Member Profile Picture
    on at

    Thank you.  I will give it a try later.

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    You can simply do that using js:

    document.getElementById('textboxname').style.borderColor = "red";

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans