updated form.js to hide forms after successful submission