Displaying a pop-up message after the user submits a Marketo form

Anonymous
Not applicable

Displaying a pop-up message after the user submits a Marketo form

We have a form on our Pricing page, and rather than direct a user to another page after they submit the form, I'd like to just display a pop-up message that says something like 'Your order was submitted successfuly. Thank you.'

Is there a way to set this up for Marketo forms?

Thanks,

David

Tags (1)
3 REPLIES 3
Anonymous
Not applicable

Re: Displaying a pop-up message after the user submits a Marketo form

I am not sure about the pop up, but this help article will you how to set up a thank you after form fill:

https://community.marketo.com/MarketoArticle?id=kA050000000LHXcCAO
Anonymous
Not applicable

Re: Displaying a pop-up message after the user submits a Marketo form

David,

You'll need to write some custom Javascript to do this; someone has probably shared this on the forum already, and if not, the Forms 2.0 guide on http://developers.marketo.com/ will be a good guide for your developer.
Igor_Khripunov
Level 4

Re: Displaying a pop-up message after the user submits a Marketo form

Hi!

It works for Form 2.0 if you drag and drop on landing page:

<script type='text/javascript'>
    $(document).ready(function () {
        MktoForms2.whenReady(function (form) {
            //Add an onSuccess handler
            form.onSuccess(function (values, followUpUrl) {
                //get the form's jQuery element and hide it
                $('#YOUR-FORM').hide();
                $('#TY-TEXT').show();
                //return false to prevent the submission handler from taking the lead to the follow up url.
                return false;
            });
        });
    });
</script>