i want to get back an array of all:
- hidden inputs
- text inputs
- select inputs
- checkboxes
I see this page but it seems like you have to query for checkboxes seperately
is there anyway to have one selector get everything in one array?
i want to get back an array of all:
I see this page but it seems like you have to query for checkboxes seperately
is there anyway to have one selector get everything in one array?
This will return what you're looking for I think...
$("input:hidden, input:text, select, input[type='checkbox']")
I'm not sure if you needed this or not as well but for text areas you'd also want to add...
$("textarea")
Depending on your goal, $('your_form_here').serialize()
might be what you're looking for. It takes all values from a form, in order to for example submit it via AJAX.
Try these selectors:
input
s: input[type=hidden]
input
s: input[type=text], input:not([type])
select
s: select
input[type=checkbox]