WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
Can you have multiple pop-ups forms on same page? (3 posts)

  1. kateM82
    Member
    Posted 2 years ago #

    I am following this great tute to include a gravity form in a light box on my site - http://websitesetuppro.com/how-to-open-gravity-forms-form-in-a-lightbox/#comment-4503

    It worked well, but I would actually like to have a few pop up options (register, subscribe, contact us..) on the same page, and it only seems to work for one.

    This is the code I have tried, but only the first form works.

    <div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1">
    <?php gravity_form(37, false, false, false, '', true); ?>
    </div>
    <div id="fancyboxID-2">
    <?php gravity_form(12, false, false, false, '', true); ?>
    </div>
    <div id="fancyboxID-3">
    <?php gravity_form(26, false, false, false, '', true); ?>
    </div></div>
    
    <li id="nav-add2-05"><a href="#fancyboxID-1" class="fancybox" title=""><span>REGISTER</span></a></li>
    <li id="nav-add2-06"><a href="#fancyboxID-2" class="fancybox" title="Love it, hate it, let us know!"><span>CONTACT</span></a></li>
    <li id="nav-add2-07"><a href="#fancyboxID-3" class="fancybox" title=""><span>WIN</span></a></li>

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. kateM82
    Member
    Posted 2 years ago #

    ok, I am updating me own post, I have managed to get the three seperate lightboxes working when containing simple text, but not with the gravity forms php code... looks like that is more the issue.

    (this is in the theme files, not on a post or page btw)

    Any ideas? Thanks

  3. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Kate,

    If you look at the page source code (when rendered in a browser I mean, not when editing the template file) do you see the full forms printed out inside their inline divs?

    Have you tried wrapping each one in their own hidden div? FancyBox has a little bug that duplicates the hidden div when closing the box and placing the content back inside the original hidden div... Hard to explain and normally no problem since we're talking hidden divs anyway but it might have some effect in this case.

    Maybe if you give me a link I can discover more about what is going wrong...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic