Update form.js

On line 113, a function is dependent on submitting a form, and I am not sure how to bypass this without screwing up the rest of the code