SOLVED

Stay on Same Page Form Submits

Go to solution
Anonymous
Not applicable
I looked for similar discussions and was unable to find anything. I figured this would be a popular ask for forms 2.0

On form submission, can I make the submitter stay on the same page, but just display a message after submit, such as thank you. Basically as if the form was submitted via AJAX.

Thanks.
Tags (1)
1 ACCEPTED SOLUTION
Valerie_Armstro
Level 10 - Champion Alumni

Hi Eric,

There is an example of the JavaScript you will need to use in order to achieve this on the Marketo Developers site. 

Example 1 - Hide the form after successful submission.  Does not take the visitor to the follow up p...

View solution in original post

12 REPLIES 12
Anonymous
Not applicable
Yeah this solution doesn't work for me either. The form lags on submit and deactivates the submission button.
Anonymous
Not applicable
This thing doesn't realluy work for me.. several problems.. very odd. It might be our website, but after trying it in several spots, I till find it better to sadly write all of my own code 😕
Anonymous
Not applicable
Thanks Val!

I knew I saw it somewhere before.
Anonymous
Not applicable
This is the link to example form Val mentioned:
http://developers.marketo.com/assets/Forms2DevExamples/example1.html
Anonymous
Not applicable

A copy, just in case that example ever dies: Marketo Forms 2.0 Example 1 - JSFiddle

Valerie_Armstro
Level 10 - Champion Alumni

Hi Eric,

There is an example of the JavaScript you will need to use in order to achieve this on the Marketo Developers site. 

Example 1 - Hide the form after successful submission.  Does not take the visitor to the follow up p...

Jim_DiModica
Level 3

Valerie -

The script works for me, but I need a little more. I need for a confirmation to be revealed when the form hides. The form is in a table cell. I tried making a GIF saying "Thank You" as the cell's background image, but it's not covered by the form. The GIF is visible along with the form. How can I display a confirmation where the form was?

Thanks!

SanfordWhiteman
Level 10 - Community Moderator

Jim, sounds like ultimately a CSS issue. If you want to reveal on hide, you have to get positioning and z-order right. Pleas post a link to your page.

Jim_DiModica
Level 3

Hi Sanford -

Because the contest started yesterday I had to go with separate form and confirmation pages. I am interested in a resolution, and appreciate your looking into this so I posted the important portion of the code here. It's a test form, so if you need to submit it, please feel free.

Thanks, and happy holidays!

Jim

SanfordWhiteman
Level 10 - Community Moderator

For that particular design, you were just missing a background color on the form:

.mktoForm {

    background-color: white;

}

(+ match the TD background color)

Jim_DiModica
Level 3

Absolutely worked! Tip of the hat to you, Sanford.

Anonymous
Not applicable

thanks! exactly what I was looking for.