$('form input').change(function(){
if ($(this).val() != '') {
alert('The Form Not Empty');
} else {
alert('The Form Empty')
}
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<form method='get' action=''>
<input type='text'>
<input type='number'>
<input type='checkbox'>
</form>
I want to track the form inputs, If the entire form inputs are empty, i alert empty once, If a single input is not empty, I alert not empty
I keep getting Not Empty
on the checkbox, But it works ok on the text
inputs.
Can I just track the form itself if it is not totally empty or not instead of the inputs?