Skip to content

Tag: symfony6

Symfony6 – add iput field after submitting form

i have an ChoiceType::class input field in my form with, now just as an example, two choices: ‘choices’ => [‘type1’ => ‘1’, ‘type2’ => ‘2’] now when the user select type2 i want to add an exta TextType::class inputfield to the form. But i dont want to show the input field before and i want it to be required if

cache with dynamic pages

I am currently developing a WEB site on symfony 6 and during production testing I have a problem with the TWIG cache. Indeed, my site includes a page editing feature. So when rendering the first time, the page is rendered correctly. However, if the editor then modifies the page, and I return to the page is still the old version.

Own Symfony serializer gets added as encoder to default one

I’m using Symfony 6.0.7 and noticed this Behavior: When I register a custom serializer as service, it gets added as encoder to the default “@serializer” one. Why is this the case and how can I change this behavior? My problem is, that this messes up the error handling of the FOSRestBundle which now always outputs the stacktrace of an exception