Disappearing Success Message wont stay

Home Forums Quform PHP Disappearing Success Message wont stay

This topic is: resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #33439
    markko
    Participant

    Hello,

    I have your PHP version of QuForm

    I want the success message (displayed after submitting the form in green at the top) to remain without disappearing.

    I’ve read your page here;

    Quform JavaScript options

    I’ve added this to the top of my scripts.js file

    $('form.quform').Quform({
        successTimeout: 0
    });

    But the success message still disappears after a few seconds.

    I’ve changed it to read

    $('form.quform').Quform({
        successTimeout: 24000
    });

    But it still disappears at the same time.

    I looked elsewhere on the support forum and found this page (post-20275)

    Success Page

    so tried that

    $('form.quform').Quform({
    	successEnd: function () {
    		this.$container.slideUp();
    		$('.my-other-button').hide();
    	},
    	successTimeout: 0
    });

    So I tried this but still not working.

    Any ideas?

    Here is a copy of my full script.js

    'use strict';
    jQuery(function($) {
    
    $('form.quform').Quform({
    	successEnd: function () {
    		this.$container.slideUp();
    		$('.my-other-button').hide();
    	},
    	successTimeout: 0
    });
    
    	// Tooltips
    	if(window.tippy) {
    		$('.quform-tooltip').each(function () {
    			tippy(this, {
    				theme: 'quform'
    			});
    		});
    	}
    
    	// Changes subject to a text field when 'Other' is chosen
    	$('#subject').replaceSelectWithTextInput({ onValue: 'Other' });
    });
    
    (function ($) {
    	$(window).on('load', function () {
    		// Preload images
    		var images = [
    			'quform/images/close.png',
    			'quform/images/success.png',
    			'quform/images/error.png',
    			'quform/images/default-loading.gif'
    		];
    
    		// Preload images for any active themes
    		if ($('.quform-theme-light-light, .quform-theme-light-rounded').length) {
    			images = images.concat([
    				'quform/themes/light/images/button-active-bg-rep.png',
    				'quform/themes/light/images/close.png',
    				'quform/themes/light/images/input-active-bg-rep.png'
    			]);
    		}
    
    		if ($('.quform-theme-dark-dark, .quform-theme-dark-rounded').length) {
    			images = images.concat([
    				'quform/themes/dark/images/button-active-bg-rep.png',
    				'quform/themes/dark/images/close.png',
    				'quform/themes/dark/images/input-active-bg-rep.png',
    				'quform/themes/dark/images/loading.gif'
    			]);
    		}
    
    		if ($('.quform-theme-minimal-light').length) {
    			images = images.concat([
    				'quform/themes/minimal/images/close-light.png'
    			]);
    		}
    
    		if ($('.quform-theme-minimal-dark').length) {
    			images = images.concat([
    				'quform/themes/minimal/images/close-dark.png',
    				'quform/themes/minimal/images/loading-dark.gif'
    			]);
    		}
    
    		$.preloadImages(images);
    	});
    })(jQuery);

    I would also like the form to retain the data that was typed in and not deleted when submitted as well, if that is possible.

    Reason being is that when the see the data that has been submitted, and it may be wrong, they can just modify the already populated fields.

    Thank you in advance for your help

    • This topic was modified 2 years, 7 months ago by markko.
    • This topic was modified 2 years, 7 months ago by markko. Reason: added URL for second method
    • This topic was modified 2 years, 7 months ago by markko.
    #33444
    markko
    Participant

    Apologies. Chrome was stubborn. I needed to Ctrl-F5 to delete the cached js script. It is now working. 🙂

    On my second question is it possible to keep the form data intact, rather than clearing it when submitted?

    • This reply was modified 2 years, 7 months ago by markko.
    #33448
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #33450
    markko
    Participant

    Fantastic Ally. Works perfectly. Apologies for not discovering the original problem sooner!

    #33451
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy