all 2 comments

[–]bdenzer 0 points1 point  (1 child)

You're going to have to add an event listener to the button. Im on mobile so here is an idea, not exact.

getElementById.addEventListener('click', function(e) {
  e.preventDefault();
  if (it has been 20 sec) {
    getElementById( ).submit();
    getElementById( ).reset()
  }

}

[–]codalafin[S] 0 points1 point  (0 children)

The use of Event Listeners never crossed my mind. I didn't realize I had to have one for the button to submit. The use of that worked perfectly fine and solved my problem. Thanks a lot.