Skip to content
Advertisement

Creating a Symfony 4 Form without Database

I’m new to symfony and want to to create a simple contact form, take the submitted values and send them as an Email. I don’t want to save anything in the database.

I followed the documentation on this page: https://symfony.com/doc/current/form/without_class.html

I created a new page/action with the code from the page above:

JavaScript

But this gives me an error:

JavaScript

What am I doing wrong? Why is there all the Doctrine stuff in the Stack Trace?

Advertisement

Answer

You probably imported the wrong type. Instead of:

JavaScript

you need:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement