Solution 1:
In your input fields, stick the word required somewhere in there and your function that is not the disableSubmit should no longer need to be called. Like so:
<input name="adress_search" type="text" id="AddressSearch" required />
Solution 2:
Just keep a variable that prevents multiple submissions:
jQuery(function($) {
    var submitting = false;
    $("#EventAddForm").submit(function(event) {
        if (submitting) {
            event.preventDefault();
            return;
        }
        submitting = true;
        
    });
});
Solution 3:
Since none of hte suggestions worked, I have been doing the reseach and found a solution that helped me. Hopefully, it will be useful for somebody in the future.
     var input = document.getElementById('AddressSearch'); 
        google.maps.event.addDomListener(input, 'keydown', function(e) { 
                if (e.keyCode == 13) 
                { 
                        if (e.preventDefault) 
                        { 
                                e.preventDefault(); 
                        } 
                        else 
                        { 
                                
                                e.cancelBubble = true; 
                                e.returnValue = false; 
                        } 
                } 
        }); 
 
Post a Comment for "JQuery Preventing Form From Being Submited Twice And On Enter Key"