We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21417
    • 486 Posts
    Hello,

    I have an eform form that’s working really well - I just want to style the on screen error messages a red color.

    How do you style the eform error messages that appear on screen?

      Web design Adelaide
      http://gocreate.com.au
      • 16085
      • 203 Posts
      Check this post: http://modxcms.com/forums/index.php/topic,26382.0.html

      In assets\snippets\eform\lang\english.inc.php there’s a div class called ’errors’. You simply add the .errors and styling to your CSS. You could further and add list class to the ’ef_required_message’, although I’ve no idea how to seperate out the {fields} in to a list.

      If you mean stlying input box errors you need to use the following;

      &requiredClass
      Css class name. Will add class in (empty) required form fields on validation. Existing classes will be preserved.
      If you have already set a class for a field or label and you get unexpected css results check the order in which you have declared the classes. The

      &requiredClass
      Css class name. Will add class in invalid form fields on validation. Existing classes will be preserved.

      CSS Example:
      input.invalidValue { border:1px solid green; }
      input.requiredValue{ border:1px solid #ff0f0f; }
        • 21417
        • 486 Posts
        Hello knight knight,

        thank you - editing english.inc.php did the trick.

        thanks and all the best.
          Web design Adelaide
          http://gocreate.com.au