diff --git a/src/Rendering/Bs3FormRenderer.php b/src/Rendering/Bs3FormRenderer.php index cbf3f93..8472d54 100644 --- a/src/Rendering/Bs3FormRenderer.php +++ b/src/Rendering/Bs3FormRenderer.php @@ -109,7 +109,7 @@ private function controlsInit() $this->form->getElementPrototype()->addClass('form-horizontal'); foreach ($this->form->getControls() as $control) { if ($control instanceof Controls\Button) { - $markAsPrimary = $control === $this->primaryButton || (!isset($this->primary) && empty($usedPrimary) && $control->parent instanceof Form); + $markAsPrimary = $control === $this->primaryButton || (!isset($this->primaryButton) && empty($usedPrimary) && $control->parent instanceof Form); if ($markAsPrimary) { $class = 'btn btn-primary'; $usedPrimary = TRUE;