WordPress.org

Ready to get started?Download WordPress

Forums

WP User Frontend
Double Click Submit (11 posts)

  1. Milo99
    Member
    Posted 1 year ago #

    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/

  2. CJwrite
    Member
    Posted 1 year ago #

    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...

  3. Turismo in
    Member
    Posted 1 year ago #

    Same problem.

  4. WPChina
    Member
    Posted 1 year ago #

    Same problem here too.

  5. professor99
    Member
    Posted 1 year ago #

    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?

  6. rajun
    Member
    Posted 1 year ago #

    Same problem here.

  7. WPChina
    Member
    Posted 1 year ago #

    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.

  8. professor99
    Member
    Posted 1 year ago #

    rajun are you using WordPress 3.5.1?

  9. rajun
    Member
    Posted 1 year ago #

    yes, i m using the latest wp version.

  10. professor99
    Member
    Posted 1 year ago #

    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

  11. professor99
    Member
    Posted 1 year ago #

    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;
            },

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic