Relative Content

Tag Archive for symfony6

How to attach an eventListener to field in FormType after this fied has been populated

In my Symfony formType, I have several select fields that are dynamically populated based on various user choices. One of these fields is named ‘funding’. My objective is to attach an eventListener to the ‘funding’ field so that certain actions can be triggered once this field has been populated with its options. Below is the current implementation of my FormType class. However, it appears that the eventListener for the ‘funding’ field is not being added or triggered as expected. I would appreciate any guidance or suggestions on how to resolve this issue.

symfony6.4 CRUD right way?

#[Route (‘/addRecipe/{id}’ ,name: ‘app_addRecipe’)]
public function order(Request $request, EntityManagerInterface $em, int $id): Response
{
$form = $this->createForm(RecipeType::class);
$form->handleRequest($request);

why does my shopping cart not work? symfony 6.4

im trying to make a shopping cart for a school project and i have the code here. but i get no results
i dont get an error but it just doesnt show anything. the form before this does work with amount but as soon as i want to actually see my shopping cart it wont show

why does my shopping cart not work? symfony 6.4

im trying to make a shopping cart for a school project and i have the code here. but i get no results
i dont get an error but it just doesnt show anything. the form before this does work with amount but as soon as i want to actually see my shopping cart it wont show