Hello, I want to change the color of the required field Asterisk (*). I want to to be a different color rather than the default color. Could anyone can help me with that??
Best answer by Nayon
View originalHello, I want to change the color of the required field Asterisk (*). I want to to be a different color rather than the default color. Could anyone can help me with that??
Best answer by Nayon
View originalHi,
You’ll need a small piece of code to change the default color of the required field Asterisk (*)
First, make sure you have jQuery added to your page.
Now, put this code as a new script on the javascript tab with placement “Before Body End Tag”
<script>
$("label").each(function() {
var text = $(this).text().replace(/\*/g, "<span class=\"asterisk\">*</span>");
$(this).html(text).find(".asterisk").css("color", "#0098db");
});
</script>
Change the color code inside the " " on the snippet to your liking and it should appear as the color of the required field Asterisk (*)
Wow! Thanks
Just tried it out and it works perfectly. 😎
My pleasure, always happy to help 😃
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.