Jump to content

Changing the colour of error messages on forms

Recommended Posts

  • 1 year later...

I'm wondering how this worked after some time? I got this warning when attempting to make the change...
Warning: Adding custom CSS to your site can break your design. Please use caution when using this feature. Our support team will be limited in their ability to help you with design related issues if you have custom CSS.

Link to comment
On 6/9/2022 at 8:09 AM, ChrisFil said:

I'm wondering how this worked after some time? I got this warning when attempting to make the change...
Warning: Adding custom CSS to your site can break your design. Please use caution when using this feature. Our support team will be limited in their ability to help you with design related issues if you have custom CSS.

That is default message in Custom CSS. Don't care it.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 10 months later...
On 4/26/2023 at 9:49 PM, posyrae said:

@tuanphan This worked perfectly for the error blocks but not the error text on it's own, any idea how to fix that too? 

Screen Shot 2023-04-26 at 9.48.43 AM.png

With error text, use this code

.field-error {
    background-color: #94195f;
    color: #f1f;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 month later...
18 minutes ago, hello_studiofrey said:

I have the same issue like above but unfortunately, the code doesn't work for me.

Natasa

Form Blocks were changed in late May 2023 and there's a new selector for error messages (.mkTKK6Se1WSWC0Psa20C). Note this is a code-generated class and could change at any time.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
2 hours ago, hello_studiofrey said:

there is still a warning icon that I can't figure out how to colour in the red instead of white. 

The warning icon is an SVG so the fill colour is defined in the HTML and cannot be changed with CSS. You may want to use some CSS to hide it instead.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
40 minutes ago, hello_studiofrey said:

what would be the CSS to hide [the exclamation icon]? 

You would use the class mentioned above, followed by svg. For example:

.mkTKK6Se1WSWC0Psa20C svg {
  display: none;
}

As I said earlier, I don't expect this will endure because the class may change at any time.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 1 month later...
On 8/24/2023 at 7:12 PM, daniellenoakes said:

is there a way to target the font size of the error message? i can't seem to get it working

Use this CSS code

.field-list .mkTKK6Se1WSWC0Psa20C {
    font-size: 17px !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.