Themeforest

How can I open/close the contact form using an external link?

In addition to using the shortcodes explained in the slick contact forms plugin page the contact form tab can also be opened and closed by manually adding a CSS class to any HTML element. This means you can use images, list items or even whole blocks of text to activate the sticky/floating tab.

  • To toggle the contact form open/closed use class – “dcscf-link”
  • To only open the contact form – “dcscf-open”
  • To only close the contact form – “dcscf-close”

6 Comments

  • Here’s what I did to make a menu item activate the window.

    I used the Page Links To plugin, and on my contact page, I set the hyperlink to #

    I looked at what page-item number class the Contact menu item showed in the source (in my case 13)

    In my footer, I just added this code

    jQuery(document).ready(function(e) {
    jQuery(‘.page-item-13 a’).addClass(‘dcscf-link’);
    });

    worked like a charm!

    • Hi,

      Thanks for the code example

    • how do i insert and make this code work? please thx

      • See instructions on plugin page

  • <?php echo "“; ?> finally worked

  • Hi Lee, what should be in php to make an image activate the tab? Thanks

Leave a comment

To add code to your comments wrap the code text in [text][/text] tags