I have a html form that I am serializing the inputs using jQuery like this...
$(document).ready(function() {
$("form").on( "submit", function( event ) {
event.preventDefault();
console.log($(this).serialize());
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<form>
<input name="input1" type="text">
<br>
<input name="input1" type="text">
<br>
<input name="input1" type="text">
<br>
<input name="input1" type="number">
<br>
<input name="input1" type="text">
<br>
<button type="submit">Submit</button>
</form>
I would like to provide some feedback on how many fields have been completed, what is the simplest way to do this count?