Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1318514
    crani11
    Participant

    Hey

    Is it possible to have a button that when you click it popups with a contact 7 form, without installing a plugin? Is there a modal shortcode or something?

    Thanks in advanced

    C

    #1318525
    Paul R
    Moderator

    Hi,

    Thanks for writing in!

    You can try adding this in a raw content element.

    
    <div id="my-content">
     [contact-form-7 id="1985" title="Contact form 1"]
    </div>
    
    [button class="lightbox-selector" type="real" shape="rounded" size="small" href="#my-content" title="Example"]Open Contact Form[/button]
    
    [lightbox selector=".lightbox-selector"]
    

    Change [contact-form-7 id="1985" title="Contact form 1"] with the shortcode of your contact form.

    Hope that helps.

    #1318549
    crani11
    Participant

    Hey

    Thanks for getting back to me Paul.

    Just tried that but it’s showing the form before being clicked 🙁

    I’ve added:

    style="display: none;

    that hides the form, but when you click the button the form doesn’t appear.

    #1318571
    Paul R
    Moderator

    Hi,

    Kindly replace the code with this.

    
    <div id="my-content" style="display:none;">
     [contact-form-7 id="1985" title="Contact form 1"]
    </div>
    
    <a class="x-btn x-btn-real x-btn-rounded x-btn-regular lightbox-selector" href="#my-content" data-type="inline">Open Contact Form</a>
    [lightbox selector=".lightbox-selector"]
    

    Hope that helps

    #1318575
    crani11
    Participant

    Awesome that did the trick 🙂

    Thanks Paul, have a great day 🙂

    #1318640
    Paul R
    Moderator

    You’re welcome! 🙂

  • <script> jQuery(function($){ $("#no-reply-1318514 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>