Re: How to make forms inside Foundation modals stay on modal after submit?

Anonymous
Not applicable

How to make forms inside Foundation modals stay on modal after submit?

Hi, we used Foundation to build a modal that a user clicks on to fill out a form that's embedded with the Marketo form script.  Once the user fills out the form we want the modal to stay open and to show a thank you message.  Right now, the modal will automatically close and a page refresh will occur once the form is submitted. What's the best way to configure the form so that it will keep the modal open as well as to show a thank you message?

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: How to make forms inside Foundation modals stay on modal after submit?

Nothing specific to Foundation here.

Listen for the form's onSuccess and return false. Then you can do anything else in the listener. This is all in the Forms 2.0 docs.

Grégoire_Miche2
Level 10

Re: How to make forms inside Foundation modals stay on modal after submit?

Hi Sanford,

We tried this and it does not work. The modal closes, event if the visitor stays on the same page.

Hence this question: Keeping the modal open and display the TY message after form fillout

-Greg