1
Well, I know that the Jquery Validation
does something similar, because it only blocks a required field, if it is active, see example(In this case, if Voce accepts the "Please agree to our policy" it activates the 3 comboBox
below and the validate
becomes active for them too).
I’m using the function JQuery
find
that way:
function calc(){
alert($("#meuForm").find(".form").size());
}
On my form I put it to him to find all fields with the class="form"
My big problem is that there are invisible fields, and inactive fields, but even so he keeps counting them..... Some help?
Ummmm show @chambelix.... you can do something like this:
if($("#meuForm").find('input[type=text]:visible')){.....}
? If it does, you’re killing my problem here– MarceloBoni
$("#meuForm"). find('input[type=text]'). filter(':Visible')... solved?
– chambelix
kkk not.... if possible, ride a jsfiddle bro, I think Voce did not understand my doubt....
– MarceloBoni
I put several ways to get only fields that are not 'Hidden' or other words that are not visible
– chambelix
The initial question was... Count visible and active inputs in my form... ;/
– MarceloBoni
OK Marcelo, I thought it would be enough to put the tags...to count just put the command length... example number of visible fields: $("#meuForm"). find(":input:not([type=Hidden])"). length
– chambelix
Let’s go continue this discussão in chat.
– MarceloBoni