I have the following code that makes sure inputs on forms aren't blank, however I have 2 forms on a page and only want this to check the inputs on the form called <form id="my_form"
...
var valid_form = true;
$$('input').each(function(item){
if( item.value == '' ) valid_form = false;
});
Please can somebody tell me how to do this?