Re: Form validation messages

Anonymous
Not applicable

Form validation messages

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.
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Form validation messages

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.