WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] Multiple Contact Form Pops On The Same Page (2 posts)

  1. chea24
    Member
    Posted 1 year ago #

    Okay, I have this code:

    <?php echo do_shortcode(' [contact-form-7 id="742" title="contact"]'); ?>
    
    <a href="#contact_form_pop">contact</a>

    It works great but I want two on the same page leading to different contact forms. How do I do that?

    Also, how would I style the text differently? If I use class="fancybox" on both, they will have the same style. But if I don't use class="fancybox" it doesn't pop up.

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

  2. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Two different links need to reference different ID's and if you want to style them differently, use different classes. Don't use the class fancybox for styling rules...

    Try something like:

    <div style="display:none"><div id="contact_form_1">
    <?php echo do_shortcode('[contact-form-7 id="742" title="contact 1"]'); ?>
    </div></div>
    <a href="#contact_form_1" class="fancybox some_class">contact</a>
    
    <div style="display:none"><div id="contact_form_2">
    <?php echo do_shortcode('[contact-form-7 id="xxx" title="contact 2"]'); ?>
    </div></div>
    <a href="#contact_form_2" class="fancybox some_other_class">contact</a>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.