/ Published in: CSS
Prevent users submitting contact form if less than 2 words are entered (JavaScript)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('#question_submit').click(function (e) { e.preventDefault(); if ($('#question_name').val().toString().split(' ').length > 2) { $('#new_question').submit(); } });