I\'m trying to put html inside a form button with twig like:
{{ form_widget(form.jiraStatus, {
\'label\': \'Bug\',
An even simpler solution might be to leave the buttons out of the form type and set name
and value
attributes. Then retrieve them as you would normal post parameters in the controller.
In your template:
{{ form_start(form) }}
Then in your controller
if ($form->isSubmitted() && $form->isValid()) {
$clicked = $request->request->get('clicked');
}