Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor vadim8vz

    (@vadim8vz)

    Hi, use this code:

    
    <script>
    (function ($) {
        $(document).on('ready', function () {
            $('.vdz_cb_btn, .vdz_cb_widget_btn').on('mfpOpen', function() {
                $('form#vdz_cb_form input').val('')
            });
      });
    })(jQuery);
    </script>
    
    Thread Starter geethujaison

    (@geethujaison)

    If I add this code, mail function will not work. So I add some code on popup opening click event as following

    (function ($) {
        $(document).on('ready', function () {        
            $('.warning').show();   
            $('.success').show();
            $('#vdz_cb_btn').on('click', function() {  
                  $('form#vdz_cb_form input').val('');           
                  $('form#vdz_cb_form').show();
                  $('.warning').hide();   
                  $('.success').hide();
            });
      });
    })(jQuery);
    • This reply was modified 4 years, 4 months ago by geethujaison.
    Plugin Contributor vadim8vz

    (@vadim8vz)

    Oh its yes I forgot about checking, this code is right (I checked the sending mail):

    
    <script>
    (function ($) {
        $(document).on('ready', function () {
            $('.vdz_cb_btn, .vdz_cb_widget_btn').on('mfpOpen', function() {
                $('form#vdz_cb_form input[type!=hidden]').val('');
            });
      });
    })(jQuery);
    </script>
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Clear popup when closing’ is closed to new replies.