Hi,

How can I detect if an error message is displayed for a form?

I want to display the same form after submit with all valitated data. If no error occured, I want to add an additional html block to the output page. (e.g. for a simple calculator: the input fields should show the entered values and below the form, the result is displayed).

I tried to use $form['#after_build'] to set an variable to display. But after_build is always used (with and without errors).