More efficient js form validation - changing submit button value