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 to CSS target .validation_error after having used the form_validation hook

  1. Luis
    Member

    Hi,

    Perhaps there is a simple solution for this problem, but I am quite new both at GF and WordPress, so I need some help with this.

    I wanted to modify the validation_error message which comes on submission when there's any data left or wrong in the form's fields. So I used the form_validation hook, and it worked. But now the message comes too tiny, totally unreadable. I tried to CSS target it so I could modify its appearance –basically make it bigger, but I can't get that to work. How could I do that?

    Thanks in advance.

    Posted 12 years ago on Thursday October 25, 2012 | Permalink
  2. Can you post a URL to your form so we can see what's happening? It's easier to give you some guidance if we can see the issue first hand.

    Posted 12 years ago on Friday October 26, 2012 | Permalink
  3. Luis
    Member

    Hi Kevin,

    thank you for your answer. Here's the form:

    http://www.madrid-texas.com/eurodealcfds/apertura-cuenta-demo

    The site is in Spanish, but either way you'll see the validation message in the place it's supposed to show up… just much smaller, and with no styling on it.
    Let me know what I did wrong.
    Thanks!

    Posted 12 years ago on Friday October 26, 2012 | Permalink
  4. Luis,

    In your validation message you are returning, you should be able to account for the default styling.

    return "<div class='validation_error'>your message</div>";

    Posted 12 years ago on Friday October 26, 2012 | Permalink
  5. Luis
    Member

    Hi Rob,

    Actually, I've just modified the font values in the Headway's GF block – I'm afraid I needlessly fell into a silly loop with the CSS targeting thing – and it did the job. Not exactly the font I wanted – I'm using @font-face for this site – but any of the default fonts will work for this kind of message.

    Thanks to both of you for your responses.

    Posted 12 years ago on Friday October 26, 2012 | Permalink
  6. Cool - glad you got it sorted.

    Posted 12 years ago on Friday October 26, 2012 | Permalink

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