PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How Do I Change Color On Error Message?

  1. danbarton
    Member

    Hello, I am trying to figure out how to change the default color of the error message that pops up when a required field is not filled out and the submit button is pressed. Currently that message is red and I would like to change it to white? Thanks!

    Posted 14 years ago on Monday March 7, 2011 | Permalink
  2. You would do this by adding custom CSS to your themes stylesheet to target and style that element or elements. Here are some examples of how to target Gravity Forms html elements and style them using CSS:

    http://www.gravityhelp.com/documentation/css-targeting-samples/#validation

    Posted 14 years ago on Monday March 7, 2011 | Permalink
  3. danbarton
    Member

    So I tried this and the color stayed red. Can you tell me what I am missing?
    .gfield_error .gfield_label {color: #FFFFFF!important;}

    Posted 14 years ago on Monday March 7, 2011 | Permalink
  4. You have to use better specificity for your rule. That's exactly what the targeting samples the Carl referred you to are about. Try this instead..

    body .gform_wrapper .gform_body .gform_fields .gfield_error .gfield_label {color:#fff}

    Posted 14 years ago on Monday March 7, 2011 | Permalink
  5. danbarton
    Member

    Thanks, I used this and it looks perfect. Love your program!
    .validation_error {color: #ffffff!important;}

    Posted 14 years ago on Monday March 7, 2011 | Permalink
  6. Cool. Thanks for the update.

    Posted 14 years ago on Monday March 7, 2011 | Permalink

This topic has been resolved and has been closed to new replies.