JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#" id="traplink">Disable form for 5 secs</a>
<form action="blaah">
    <input type="text" name="bar" value="Foo"/>
    <input type="text" name="foo" value="Bar"/>
    <input type="submit" name="accept" value="Send FooBars"/>
</form>
<a href="http://www.stackoverflow.com">Stack</a>
<a href="http://www.google.com">Google</a>

JavaScript

$(document).ready(function(){

    $('#traplink').click( function(){
        // Disable form submit:
        $('form').submit( function(e){
            e.preventDefault();
        });
            
        // And enable again after 5 secs:
        setTimeout( function(){
            $('form').unbind( 'submit' );
        },5000);
    });

});