Hide Validation Message | Community
Skip to main content
November 18, 2015
Solved

Hide Validation Message

  • November 18, 2015
  • 1 reply
  • 2579 views

For reason I'd rather not go into, I'm displaying a validation message (in a little red callout) when my form is loaded. Does the API have a method to hide that?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Thanks, this get me partway there. It still pops up as soon as I click any field, though.

If you have CSS { display:none !important} on .mktoError, the error will never display.

Yes, I'm auto-submitting a hidden form fill on page load and then displaying the form if it fails to submit. (Also, I'm aware that there are better ways to go about things than submitting a hidden form, so please let's not enter that philosophical discussion).

I don't have a problem with auto-submitting.  It's actually the most scalable way to do a lot of things which people mistakenly attempt to do using the API.

1 reply

SanfordWhiteman
New Participant
November 18, 2015

Because your form is attempting to auto-submit on load and has a required field, perhaps?

You can hide the error messages using CSS (.mktoError IIRC), sure. But do you want to hide it *only the first time*?

November 18, 2015

Thanks, this get me partway there. It still pops up as soon as I click any field, though.

Yes, I'm auto-submitting a hidden form fill on page load and then displaying the form if it fails to submit. (Also, I'm aware that there are better ways to go about things than submitting a hidden form, so please let's not enter that philosophical discussion).

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
November 18, 2015

Thanks, this get me partway there. It still pops up as soon as I click any field, though.

If you have CSS { display:none !important} on .mktoError, the error will never display.

Yes, I'm auto-submitting a hidden form fill on page load and then displaying the form if it fails to submit. (Also, I'm aware that there are better ways to go about things than submitting a hidden form, so please let's not enter that philosophical discussion).

I don't have a problem with auto-submitting.  It's actually the most scalable way to do a lot of things which people mistakenly attempt to do using the API.