From 44f082be1dbf181460bcc162809b745651ac6729 Mon Sep 17 00:00:00 2001 From: manavo Date: Fri, 17 Oct 2014 15:11:14 +0100 Subject: [PATCH] Don't add the form-control class to all input elements, not always needed --- src/Manavo/BootstrapForms/FormBuilder.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Manavo/BootstrapForms/FormBuilder.php b/src/Manavo/BootstrapForms/FormBuilder.php index c9fe11f..e55ea10 100644 --- a/src/Manavo/BootstrapForms/FormBuilder.php +++ b/src/Manavo/BootstrapForms/FormBuilder.php @@ -72,7 +72,10 @@ public function closeGroup() */ public function input($type, $name, $value = null, $options = array()) { - $options = $this->appendClassToOptions('form-control', $options); + // Don't add form-control for some input types (like submit, checkbox, radio) + if (!in_array($type, ['submit', 'checkbox', 'radio'])) { + $options = $this->appendClassToOptions('form-control', $options); + } // Call the parent input method so that Laravel can handle // the rest of the input set up.