Trying to send message using Freeform Pro in a lightbox (Fancybox). I'd like to have confirmation message display inside of lightbox after successful submit. Not quite sure the best way to accomplish this. Any insight or advise?

1 Answer 1


If you want the thank you message to appear in the same Lightbox window as the form, without a refresh, you'll need to do this with Ajax. This is the basic outline of how this would happen:

  1. Create a Thank You page in the CMS with your content.
  2. Create your Freeform form and put it in the Lightbox. I'm assuming it's invoked by clicking a link on the containing page? Wrap the whole form (all the content you want to replace) with a div class="ajax-content" (or whatever you want to call it).
  3. Give your submit button a class like "get-thank-you" and create an onclick event for this button that replaces ajax-content with data from the thank you url. You can find an example of how to do this here: https://stackoverflow.com/a/13832977/990061

Hope this makes sense?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.