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

  1. chea24
    Posted 2 years 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.


  2. RavanH
    Plugin Author

    Posted 2 years 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"]'); ?>
    <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"]'); ?>
    <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


No tags yet.