protected function submitForm(HtmlForm $form, array $values = array(), $submitButton = null) { if ($submitButton == null) { $matches = array_filter($form->getButtons(), function ($b) { return $b->id == 'next-step'; }); $submitButton = count($matches) > 0 ? current($matches) : null; } return parent::submitForm($form, $values, $submitButton); }