• Hello
    I have added Subscription Widget on WordPress successfully. when i endter email and hit subscribe button it now showing any process. currently its showing direct sucesss or error message.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Pretty much the same problem in my case. My subscribe form renders in a widget, but when I hit the subscribe button nothing happens …

    Thread Starter Sanjeet Sagar

    (@rohaan9)

    I have fixed my self by override js and added

    beforeSend: function(){
    $('.mailjet_widget_form_message').html('<i class="fa fa-spinner fa-pulse fa fa-fw margin-bottom"></i>');
    },
    

    here is code full code

    
    
             jQuery(document).ready(function() {
                //option A
                jQuery("form#mailjetSubscriptionForm").submit(function(event){
                    event.preventDefault();
    				            const form = $(this);
                const message = $('.mailjet_widget_form_message');
                jQuery.ajax({
                    url : mjWidget.ajax_url,
                    type : 'post',
                    data : form.serializeArray(),
    				beforeSend: function(){
    				$('.mailjet_widget_form_message').html('<i class="fa fa-spinner fa-pulse fa fa-fw margin-bottom"></i>');
    				},
                    success : function(response) {
                        message.text(response);
                    },
                    error : function(err) {
                        message.text('An error occurred.');
                    }
                });
                });
            });
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Subscription Widget Submit’ is closed to new replies.