I have a form with id = "resource_form".
It has a lot of inputs and I'd like to avoid having to put an id on each input.
How can I access an input named "foobar" in the form with id "resource_form". Something like this:
<script type="text/javascript">
function validate() {
// need to check the value of foobar here
}
</script>
<form method="post" onsubmit="return validate();">
<input type="text" name="foobar" value="arrggh">
</form>