That would work, as long as they have javascript turned on. There is always a way to mess up form input in the client side. Client side validation of any type is only good for taking a little load off the server, and can never be depended on. Validate the hell out of it on the server side, the only way to be safe.
I am not sure exactly what you are trying to do, but it can possibly be accomplished better using PHP to gather the variables and deal with them instead of passing them to the form.