added form.js with handling of how a form acts when submitted with errors