set errors and submitted values on form after submit