Form validation messages | Community
Skip to main content
April 17, 2013
Question

Form validation messages

  • April 17, 2013
  • 1 reply
  • 622 views
We want to have Marketo forms on external pages, and we would look at using an iFrame to display the form.

This is fine, except for the form validation error messages. These appear beside the form field, which doesn't work for set iframe widths within the external page. Is there a cleaner way to display these messages so they don't mess with the iFrame? I've seen some posts about custom javascript to change the form, but I want to avoid this if possible.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

April 17, 2013
You can change the position of the error messages by adding  the following in a new HTML box on the blank LP that is displayed in the Iframe and that contains the form.

<style type="text/css">
span.mktFormMsg {
display:block !important;
left:40px !important;
position: relative !important;
}
</style>

This code was given to me by Marketo tech support and was in a help article (https://community.marketo.com/MarketoArticle?id=kA050000000KysC), but that article has been recently revised and this code removed.  I couldn't find any other help article with this.  However, this code works quite well.