Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

SOLVED Required field - js message - change color


Go to End


3 Posts   2062 Views

Avatar
dimtank

Community Member, 2 Posts

17 September 2011 at 11:16am

Hello,

I am using SS 2.3.7 on cms/contact page
I am trying to change the color of the message wich appears when you click on the email field.

The message is "Please fill out "Email Address*", it is required."

I found something in cms\mysite\code\validator.js line 150
var errorMessage = ss.i18n.sprintf(ss.i18n._t('VALIDATOR.FIELDREQUIRED', 'Please fill out "%s", it is required.'), fieldLabel);

Is there a way to change the color of this message ?

Thanks a lot !

Avatar
Ryan M.

Community Member, 309 Posts

17 September 2011 at 2:43pm

Edit the CMS css file or override it.
You'll need to locate the selector though.

Avatar
vegetav

Community Member, 23 Posts

2 March 2012 at 8:53am

.required { color: #E40000; }