I have a custom module that creates a form. I want to display a message to a user, but I don't want to use the normal drupal_set_message method. I want to add a div with text and images to the top of the form after submission.
A user may be submitting this form multiple times. So after submission, I want to still be on this page. It's just that after the form is submitted, a new div will appear at the top.
I don't really know how to detect that the form was submitted. It's similar to replacing the form and displaying a thank you message.
What is the best way to achieve that with Drupal 8?