• Resolved deepthi yamaka

    (@deepthi-yamaka)


    hi,
    i used a contact form for displaying in popup after clicking a button.my form shows the ‘Thankyou message’ after submitting.
    thing is, it form is coming fine. but, after submitting the button,pop up is getting closed on its own without showing thankyou message. if i open the popup again then i can see the message in there. can u please check this?

    the plugin that i used for creating this form is ‘form builder’. i checked with many other plugins, all are acting in the same way.

    below is the url for your reference
    http://www.creedtestsite.tk/services/web-application-development/

    plese click “Request a quote” button in the page

Viewing 9 replies - 1 through 9 (of 9 total)
  • I, too am having exactly the same problem, except I am using the Mailchimp for WP form plugin.

    The url I am having trouble with is:
    Angelwalk

    Please click on either of the “Download your free mp3” buttons.

    Both of you have to add code to your site to accomplish what you’re after. We recommend checking out Getting Started with Custom JavaScript, if you’re not familiar with this process. Also, the basis for the following code can be found here.

    @deepthi-yamaka

    jQuery(document).on('submit','.popmake-content form', function() {
    	var $popup = PUM.getPopup(this);
    	
    	setTimeout(function () {
    	    $popup.popmake('close');
    	}, 5000); // 5 seconds
    });

    After the user submits the form, this code will run and automatically close the popup after 5 seconds. The time is measure in milliseconds, and you can change it to a higher value so as to make sure the users see your thank you message.

    @saxondesign

    Your code is basically the same, but includes MailChimp classes:

    jQuery(document).on('subscribe.mc4wp','.popmake-content .mc4wp-form', function() {
    	var $popup = PUM.getPopup(this);
    	
    	setTimeout(function () {
    	    $popup.popmake('close');
    	}, 5000); // 5 seconds
    });

    Hope this helps!

    • This reply was modified 7 years, 6 months ago by waltmesser.

    @waltmesser, thanks so much for such a quick response. Unfortunately, it’s not working for me.
    I did as you said and went to the Getting Started with Custom Javascript page, added the action to my functions.php file and put the code in where it says to… it’s still not working. I even set the popup to close at 15000 (15 seconds) so I could see if anything was happening. Nothing has changed; however, the javascript seems to be loading in the footer. The form is still closing after 3 seconds, and no thank you message is appearing.

    I’m open to suggestions!

    • This reply was modified 7 years, 6 months ago by saxoncreative.
    Thread Starter deepthi yamaka

    (@deepthi-yamaka)

    @waltmesser,
    thnks for ur reply

    as per ur suggestion,
    i added the following code to my functions.php file,
    but it is throwing an error of “Parse error: syntax error, unexpected ‘<‘ in /home/…./functions.php on line 1866 “.

    i am very new to this coding part.please help me how to add this.
    any suggestions will be very helpful.

    <?php
    add_action( ‘wp_footer’, ‘my_custom_popup_scripts’, 500 );
    function my_custom_popup_scripts() { ?>
    <script type=”text/javascript”>
    (function ($, document, undefined) {
    // Your custom code goes here.
    jQuery(document).on(‘submit’,’.popmake-content form’, function() {
    var $popup = PUM.getPopup(this);

    setTimeout(function () {
    $popup.popmake(‘close’);
    }, 10000); // 10 seconds
    });

    }(jQuery, document))
    </script><?php
    }

    @deepthi-yamaka @saxondesign

    I will have our Lead Dev @danieliser take a look as soon as he is available.

    Thanks for your patience.

    @waltmesser, I am wondering if AJAX needs to be activated in order to keep the page from refreshing. I know that I can activate AJAX using Gravity Forms, but it is not so easy using MailChimp. Could it be that by embedding a gravity form I might have better luck?

    Thanks again for your help!

    Plugin Author Daniel Iser

    (@danieliser)

    @deepthi-yamaka – Apologies for the delay, the error you got was because you didn’t need the first line.

    Simply remove this line:

    <?php

    @saxondesign – Using a Gravity Form in our popups will automatically turn on AJAX.

    Hope that helps.

    Closing this ticket due to inactivity. If you’re still having an issue, create a new thread, link this one, and we will continue troubleshooting.

    Please take a moment to rate and review the plugin and or support.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘popup is getting closed after submitting form’ is closed to new replies.