PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Add close window button

  1. I'm working on a new form using the latest RC of gravity forms, and what I was trying to do is add a close window button after the thank you message confirmation. By adding "a href="window.close()" rel="nofollow">Close Window" the close window appears, however, it doesn't actually close the fancybox modal that the form appears in. I want to add this to simplify navigating throughout the site, so any help would be greatly appreciated.

    http://www.PoliticalShortfalls.com Click on register to display the form. Upon completing the details you can see where the "Close Window" appears.

    Posted 11 years ago on Saturday March 12, 2011 | Permalink
  2. *bump*

    Posted 11 years ago on Sunday March 13, 2011 | Permalink
  3. Yeah, that's not really a Gravity Forms question, it's a Fancybox support question. I'm pretty sure that method won't work because the Fancybox modal isn't really a window.

    A quick search turned up some good information..

    http://stackoverflow.com/questions/1829319/close-fancy-box-from-function-from-within-open-fancybox

    http://fancybox.net/blog

    It looks like you use a special function to close the modal.

    onclick="$.fancybox.close();"

    If that doesn't work, you'll need to research that more on their support site.

    Posted 11 years ago on Monday March 14, 2011 | Permalink
  4. Would that go through the href or where do i need to pass that?

    Posted 11 years ago on Monday March 14, 2011 | Permalink
  5. it Looks like you just put that as a link in your modal window confirmation content somewhere..

    <a href="javascript:;" onclick="$.fancybox.close();">close window</a>

    Posted 11 years ago on Monday March 14, 2011 | Permalink