- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2015 02:15 PM
On one of my forms I have a several mandatory fields. Generally a mandatory field has a red asterisk. One of the fields if auto populate with data from another form. When this happens it now show with a black asterisk.
What is causing this asterisk to change colors?
Through programming can you force the asterisk to be red?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2015 03:16 PM
Hi David,
Pre-filled mandatory fields use a different color for the asterisk icon than non-pre-filled mandatory fields. You can actually find this in the heisenberg style sheet:
.is-prefilled .required-marker:before {
color: #bdc0c4;
}
.required-marker:before {
font-family: "retina_icons";
display: inline-block;
vertical-align: middle;
line-height: 1;
font-weight: normal;
font-style: normal;
speak: none;
text-decoration: inherit;
text-transform: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "ï†";
color: #d64541;
padding: 0 8px;
}
#bdc0c4 is the default value for $color-light in the default theme (at least on the build I am using), while #d64541 is the default value for $color-red.
You can change the default values for the colors using the built-in theme support:
CSS Theme Support - ServiceNow Wiki
The specific variable is shown here:
CSS Theme Support - ServiceNow Wiki
However, doing so may affect more than you expect. If you want to change *just* the icon, then you may want to look into solutions like:
How to make the mandatory asterisk red on tabs that have mandatory fields
How to make the mandatory asterisk size bigger on tabs that have mandatory fields
Can you left align labels on forms in Eureka? CSS?
Where to find css_includes.css
None of those address your specific question, but they all provide approaches you might take in doing so. Combined with the specific style information provided earlier, you should be able to either change the themes for your instance, or inject CSS on the specific form in question (or all forms, depending on the solution you choose) which overrides that specific class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2015 02:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2015 03:16 PM
Hi David,
Pre-filled mandatory fields use a different color for the asterisk icon than non-pre-filled mandatory fields. You can actually find this in the heisenberg style sheet:
.is-prefilled .required-marker:before {
color: #bdc0c4;
}
.required-marker:before {
font-family: "retina_icons";
display: inline-block;
vertical-align: middle;
line-height: 1;
font-weight: normal;
font-style: normal;
speak: none;
text-decoration: inherit;
text-transform: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "ï†";
color: #d64541;
padding: 0 8px;
}
#bdc0c4 is the default value for $color-light in the default theme (at least on the build I am using), while #d64541 is the default value for $color-red.
You can change the default values for the colors using the built-in theme support:
CSS Theme Support - ServiceNow Wiki
The specific variable is shown here:
CSS Theme Support - ServiceNow Wiki
However, doing so may affect more than you expect. If you want to change *just* the icon, then you may want to look into solutions like:
How to make the mandatory asterisk red on tabs that have mandatory fields
How to make the mandatory asterisk size bigger on tabs that have mandatory fields
Can you left align labels on forms in Eureka? CSS?
Where to find css_includes.css
None of those address your specific question, but they all provide approaches you might take in doing so. Combined with the specific style information provided earlier, you should be able to either change the themes for your instance, or inject CSS on the specific form in question (or all forms, depending on the solution you choose) which overrides that specific class.