Changed modal javascript so fields clear after form submission