Hide a form after successful submission in D8?

I built a module that includes a form. After submission, the thank you message is displayed but the form stays on the page. Is there a way for the form to go away since users do not need to see it after submission? And this is Drupal 8. Thanks!

Drupal version: 

Source: https://www.drupal.org/taxonomy/term/4/feed