update form and add client side validation