Support » Plugin: Easy FancyBox » Close fancybox when contact form 7 is submitted

  • Resolved oldcreakyknees

    (@oldcreakyknees)


    Hi there,

    First of all, thanks for the great plug-in. I’ve just started to use it and, with a bit of digging around on the forum and your FAQ section, have got it all working quite well.

    I’m now successfully using Easy Fancybox to load a pop-up which displays a form (Contact Form 7) on page load. However, I can’t find a way of closing the box other than clicking the ‘X’ in the top right-hand corner of the pop-up, clicking on the main content or pressing the ‘Esc’ key.

    Ideally, I’d like to
    1. be able to put a ‘close the pop-up’ button in the pop-up
    2. close the pop-up when a form has been submitted; maybe via a button in Contact Form 7’s ‘your mail was sent successfully’ message; or a couple of seconds after the ‘success’ message has shown.

    Do you think there’s a way to do this?

    Thanks and all the best.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author RavanH

    (@ravanh)

    Hi,

    a couple of seconds after the ‘success’ message has shown.

    yes it would need to be a bit after a successful submission but not after a failed one…

    Idea: can Contact Form 7 messages contain HTML code? If so, then you could try adding to the success message text: <a href="javascript:jQuery.fancybox.close();return false;" class="button">Close</a>

    … thanks for the prompt reply.

    So that’s to add a ‘close’ button to the ‘success message’?

    I’m working on another project for the next couple of days. I’ll look in to this and let you know how I get on.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Close fancybox when contact form 7 is submitted’ is closed to new replies.