cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Styling the Mandatory Field Asterisk

bmursell
Participant
0 Likes
732

Dear experts,

Is there a quick way of defining the colour of the asterisk that denotes a mandatory field within a form/landing page combo - it currently defaults to the blue shade as shown below. I have tried to find the HTML/CSS snippet but haven't had any luck. I know there is the ability to apply CSS to SMC Forms, but from what I understand, this takes a bit of configuration and we're looking to go live with a form early next week.

Thanks

Bradley

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi bradnmursell. It was a difficult one, but doing some tests I think I have some kind of solution. If you look at a published landing page, is there a class and a piece of CSS for the * as shown below:

.sapCpLabel:not(.sapCpLabelRequiredBefore):after {
    content: "*";
    color: RoyalBlue;
    visibility: hidden;
}

If you want to see that on the CSS stylesheet, it starts on the line 160 of the sapContentPage.css.

The solution to change that is to follow this blog post that gives you an idea of how to style the forms and then apply a specific CSS class to that field that overrides the color.

Hope that helped 🙂 Let me know if you need more help. Regards,

bmursell
Participant

Hi bruno.alejandro

Perfect, that is really helpful. Thank you!

Regards

Bradley

Answers (0)