What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.

  • Profile Image

    Is it possible to get a javascript callback when an embedded form is submitted?

    Asked by Jan Misker on February 23, 2013 at 11:00 PM

    I want to show a form on my page, embedded as an iframe (I don't want a lightbox but embed it differently).

    Is it possible to get a javascript callback, e.g. via postMessage event, when the form is submitted? That way I can hide / destroy the iframe after submission.

  • Profile Image
    JotForm Support

    Answered by EltonCris on February 24, 2013 at 01:28 AM

    Hi Jan,

    That's possible using your form source code and inject the scripts there to get the function you need. After that, save the form source code as HTML, upload it to your website and embed it as iframe. Example:

    <iframe allowtransparency="true" src="http://www.yourwebsite.com/form.html" frameborder="0" style="width:100%; height:465px; border:none;" scrolling="no"></iframe>

    Let us know if you have further questions. Thanks!