How to make forms inside Foundation modals stay on modal after submit? | Community
Skip to main content
June 14, 2016
Question

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

  • June 14, 2016
  • 1 reply
  • 1815 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
June 14, 2016

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
May 10, 2018

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