Added form error handling.