reading best practices symfony @ http://symfony.com/doc/current/best_practices/index.html says it's recommended buttons added in template, not in form class nither in controller follows:
{{ form_start(form) }} {{ form_widget(form) }} <input type="submit" value="create" class="btn btn-default pull-right" /> {{ form_end(form) }}
the problem in way, button not "part" of form, so... in controller can't validate if button clicked:
if ($form->get('mybutton')->isclicked)
always throws me error: child "mybutton" not exist. happens if create button way:
<button id="form_button" name="form[button]">button</button>
i know id , name has format in symfony... so... don't understand why recommends create buttons in template if not part of form... or maybe i'm doing wrong?
thank , sorry english.