Skip to main content
1 of 2

Form values empty in submitForm function when form is in a block

I've created a simple form in Drupal 8. When I create a route towards it, it's working fine. The values I submit are dumped in the submitForm function, but as soon as I render the form within a block the $form_state variable is always empty in submitForm.

I've done this a hundred times and it works on every site, but not on this Drupal 8.9 install, so I am wondering if something might have changed. Here is my form: https://pastebin.com/KShaLJZ4 and my block code https://pastebin.com/1AGGRZkR

Hope someone can help me out these holidays.

Thanks!