3
How to use Jquery to attack the attribute name of all inputs and check if there is value
Current Code
Form:
...
<input type="text" name="nome[]" value="">
<input type="text" name="nome[]" value="">
<input type="text" name="nome[]" value="">
...
Javascript:
...
$('.cadastrar').on("click", function() {
var nomes = $('input[name="nome[]"]');
console.log(nomes);
});
...
I would have to check the value of each input and if there are any blanks it would return false and an Alert..
only I stopped when it was time to check field by field. I couldn’t continue.