Support » Plugin: Popup by Supsystic » JavaScript Method to disable Supsystic popup

  • Resolved simonalwild

    (@simonalwild)


    We have integrated a gravity form into a popup. I was wondering if there is a JavaScript method to disable a popup or prevent it from showing when a user hits the submit button? Here is my jQuery function:

    jQuery(window).load(function() {
      jQuery("#gform_submit_button_15").click(function(){
        localStorage.setItem('popup_submitted', true);
      });
      if(localStorage.getItem('popup_submitted') === true) {
        // Method to disable popup goes here.
      }
    });

    I have noticed that this can’t be done on a user action filter as I don’t think the plugin has gravity forms integration.

    Thanks,

    Simon

    • This topic was modified 7 years, 1 month ago by simonalwild.
    • This topic was modified 7 years, 1 month ago by simonalwild.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter simonalwild

    (@simonalwild)

    For now I have done this hack:

    
    jQuery(document).ready(function(){
      jQuery("#gform_submit_button_15").click(function(){
        localStorage.setItem('popup_submitted', true);
      });
      if(localStorage.getItem('popup_submitted') !== null) {
        if(jQuery( "#gform_confirmation_message_15" ).length){
          // on confirmation page.
        } else {
          jQuery("#ppsPopupBgOverlay").addClass('hidden');
          jQuery(".ppsPopupListsShell").addClass('hidden');
        }
      }
    });
    Plugin Author supsystic

    (@supsysticcom)

    Hi!
    Go to /wp-content/plugins/popup-by-supsystic/modules/popup/js/frontend.popup.js – in this file are described all functions for using popup on frontend. In your case you need to use ppsShowPopup() function – where the first parameter should be popup ID.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JavaScript Method to disable Supsystic popup’ is closed to new replies.