Form Generator Refactor for form errors