Usually i declare my buttons in symfony2 like this:
<a href="{{ path('delete_route_name', {'id': entity.id }) }}">Delete</a>
but in this case i have to use the following statement:
$form->add('submit', 'submit', array('label' => 'Save Changes', 'attr' => array('style' => 'position: relative; left:33%')));
because this button is just in some cases (within the form) necessery.
As well i want call a function in a controller with this button. How i can add a controller path to this button?
of course i can work with JavaScript, but im looking for a Solution without some JavaScript.
Thanks for the feedbacks.