Move onchange to hidden input