Skip Navigation

[Fixed in next Release] CSS classes applied to Form Messages field are not applied to error messages displayed in Forms validation

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by Christian Cox 3 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#2095725

One question I do have, is regarding the error message which now displays above my form. So on my post form code, I have the following shortcode in there:

[cred_field field='form_messages' class='uk-alert uk-alert-warning']

Notice I have slightly changed the css classes of the alert to 'uk-alert' etc (this is to use my theme framework styling, I am not using bootstrap but the uikit framework). However, the error message which displays is wrapped in the classes 'alert' and 'alert warning', so it reverts back to the bootstrap classes, even though I have overwritten those in my 'form_messages' shortcode.

Do you have any idea why that might be?

#2095753

Hi, I'm not sure why CSS classes added to the Form Messages block or shortcode do not seem to be respected on the front-end Form validation message area. I'm able to see the same problem in a local test site, so I'm asking my 2nd tier team to take a closer look. I will let you know what I find out.

#2095895

awesome - thank you Christian 🙂

#2096717

My second tier team has confirmed the problem and escalated the issue to our developers. I will keep you posted here as I receive updates about the problem. In the meantime, I could help you determine a CSS selector you can use to override the styles applied to this area, if I can see it in the browser. Otherwise, you may need a custom JavaScript solution that swaps this error message container's CSS classes upon page load (for non-AJAX forms) or upon some global AJAX event (as there is no public API for Forms JavaScript events).

#2100553

Quick update - our developers have informed me the fix for this issue will be included in the upcoming Forms 2.6.10 release. I still do not yet have a schedule available for the release, so I will continue to keep you up-to-date here as I receive more information.