update template and validate forms