Skip to content

Commit

Permalink
Don't add the form-control class to all input elements, not always ne…
Browse files Browse the repository at this point in the history
…eded
  • Loading branch information
manavo committed Oct 17, 2014
1 parent 855126e commit 44f082b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Manavo/BootstrapForms/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 44f082b

Please sign in to comment.