Support » Plugin: Easy FancyBox » Open Contact Form in Easy FancyBox from Menu item

  • Resolved serojja



    First of all, I`d like to thank the developers of this beautiful plugin – it is really useful and easy to use.

    Second, I am really far from being good at technical knowledge, so please forgive me my incompetency. So, Id like ask you a question. Lets say I am opening a Contact Form using Easy FancyBox and it works fine when I click on the word combo “Contact Form”:

    <a href="#UniqueID-1" class="fancybox">Contact Form</a>
    <div class="fancybox-hidden"><div id="UniqueID-1">
    [contact-form-7 id="546" title="0542"]

    It works perfectly when I am using a picture to open an Easy FancyBox with a Contact Form inside like this:

    <a class="fancybox" href="#contact_form_pop"><img class="aligncenter" alt="" src="http://localhost/localsite/wp-content/uploads/2013/07/tame_small3.jpg" /></a>
    <div class="fancybox-hidden" style="display: none;">
    <div id="contact_form_pop">[contact-form-7 id="546" title="0542"]</div>

    But Id like to open a Contact Form by clicking on the menu item on the menu page. I tried to use iframe but it didnt satisfy me as it opened a copy of a page with contact form in it in FancyBox and the page stayed when I submitted the information via Contact Form. I also tried to put the “code” mentioned above into the title of the page Id like to open via menu item but it just opened an Easy FancyBox window with a text: [contact-form-7 id="546" title="0542"], so I didnt succeed.

    Could you please help me and tell me how can I open just an Easy FancyBox window with a Contact Form directly from click on menu item? Is it even possible?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • It seems I have managed to find the way to do it and it works perfectly.

    I made the following steps:
    1) Enabled CSS Classes in WP-Admin -> Appearance -> Sceen Options
    2) Inserted “fancybox” into CSS Classes for menu item
    3) Insertd shortcode for my contact form into the page I want to open from menu item like this:

    [contact-form-7 id="546" title="0542"]

    4) Used plugin “Show Content Only” to generate the custom link for the page showing only content
    5) Made the Show Content Only Link as default link for the page I wanted to display in Fancybox (where Contact Form is)

    Works great! Thanks!

    Plugin Author RavanH


    Hi serojja, thanks for sharing your solution! 🙂

    Specially your tip on the Show Content Only plugin which might be useful in many other cases.

    Took this one a step further: To call it directly – add a widget with:

    <div style="display:none" class="fancybox-hidden">
        <div id="contact_form_pop" class="hentry" style="width:380px;height:auto;">
            [contact-form-7 id="648" title="title"]

    Then put “#contact_form_pop” in the menu url field. Pop!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Open Contact Form in Easy FancyBox from Menu item’ is closed to new replies.