Hello,
When using jquery to disable the submit button after being sent once the required input in the input does not work anymore.
HTML
<form id="ajax" action="#teste" method="POST">
<p class="remodal-text">Nome</p>
<input type="text" name="nome" required>
<p class="remodal-text">E-mail</p>
<input type="email" name="email" required>
<p class="remodal-text">Assunto</p>
<input type="text" name="assunto" required>
<p class="remodal-text" required>Mensagem</p>
<textarea name="mensagem" name="mensagem"></textarea>
<input type="submit" value="Enviar" class="btn-submit" >
<div id="enviado" style="width: 100%; height: 60px;"></div>
</form>
JS
$(function(){
$(".btn-submit").click(function () {
$(".btn-submit").attr("disabled", true);
$('#ajax').submit();
});
});
Example in CodePen: link