WordPress.org

Support

Support » Plugins and Hacks » WP User Frontend » Double Click Submit

Double Click Submit

  • I am on a Mac and have tried this in 3 Browsers Firefox, Chrome, and Safari. Everything seems to work fine but the first click on the submit button does nothing. After you click it a second time it will submit the post. Anyone else having this problem?
    You don’t have to double click it really fast or anything you just have to click it 2 times before it will submit.

    http://wordpress.org/extend/plugins/wp-user-frontend/

Viewing 10 replies - 1 through 10 (of 10 total)
  • I just noticed the same problem. It’s not a huge problem, but it’s annoying. Did you find a solution?

    I might go pokin’ around in the code a little…

    Same problem.

    WPChina

    @wordpresschina

    Same problem here too.

    Don’t have this problem myself but Im using WordPress 3.4.2. Is this just a WordPress 3.5.1 problem? Is it a problem with everybody that’s using WordPress 3.5.1?

    Same problem here.

    WPChina

    @wordpresschina

    I am on 3.5.1 yes. I did not test it on lower versions. maybe there is a small conflict caused by a form someplace. I will continue to investigate.

    rajun are you using WordPress 3.5.1?

    yes, i m using the latest wp version.

    Had a look on WordPress 3.5.1 with my development version which definitely doesn’t have this problem. My try again later with the official release as I need to test the upgrade from that to the new development release

    Ok I can definitely confirm it is a problem with 3.5.1 with the official Frontend version 1.1. Its due to a bug in the checkSubmit function in wpuf.js. I rewrote this in the development version some time back due to similar bugs and this seems to solve the problem. Simply update wpuf.js with the updated version of checkSubmit below

    checkSubmit: function () {
                var form = $(this);
    
                //Save tinymce iframe to textarea
                if (typeof(tinyMCE) != "undefined") {
                    tinyMCE.triggerSave();
                }
    
                $('#wpuf-info-msg').html(' ');
    
                $('*',this).each(function() {
                    if( $(this).hasClass('wpuf-invalid') ) {
                        $(this).removeClass('wpuf-invalid');
                    }
                });
    
                var hasError = false;
    
                $(this).find('.requiredField').each(function() {
                    var el = $(this);
    
                    if(jQuery.trim(el.val()) == '') {
                        //Highlights closest visible container.
                        //Still slight bug in tinyMCE editor when submitted when display tab is "HTML"
                        //In this case the "Visible" tab won't be highlighted but this is very insignificant.
                        el.closest(':visible').addClass('wpuf-invalid');
                        hasError = true;
                    } else if(el.hasClass('email')) {
                        var emailReg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
                        if(!emailReg.test($.trim(el.val()))) {
                            el.closest(':visible').addClass('wpuf-invalid');
                            hasError = true;
                        }
                    } else if(el.hasClass('cat')) {
                        if( el.val() == '-1' ) {
                            el.closest(':visible').addClass('wpuf-invalid');
                            hasError = true;
                        }
                    }
                });
    
                if( ! hasError ) {
                    $(this).find('input[type=submit]').attr({
                        'value': wpuf.postingMsg,
                        'disabled': true
                    });
    
                    return true;
                }
    
                $('#wpuf-info-msg').html('<div class="wpuf-error">Required field(s) empty.</div>');
    		$('#wpuf-info-msg').fadeTo(0,1);
    
                return false;
            },
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Double Click Submit’ is closed to new replies.
Skip to toolbar