diff --git a/src/Manavo/BootstrapForms/FormBuilder.php b/src/Manavo/BootstrapForms/FormBuilder.php index 80de48a..32dbb7e 100644 --- a/src/Manavo/BootstrapForms/FormBuilder.php +++ b/src/Manavo/BootstrapForms/FormBuilder.php @@ -107,6 +107,8 @@ public function input($type, $name, $value = null, $options = []) // Don't add form-control for some input types (like submit, checkbox, radio) if (!in_array($type, ['submit', 'checkbox', 'radio', 'reset', 'file'])) { $options = $this->appendClassToOptions('form-control', $options); + } else if (in_array($type, ['submit', 'reset'])) { + $options = $this->appendClassToOptions('btn', $options); } // Call the parent input method so that Laravel can handle @@ -310,7 +312,21 @@ public function plainTextarea($name, $value = null, $options = []) { return parent::textarea($name, $value, $options); } - + + /** + * Create a button element. + * + * @param string $value + * @param array $options + * @return string + */ + public function button($value = null, $options = array()) + { + $options = $this->appendClassToOptions('btn', $options); + + return parent::button($value, $options); + } + /** * Append the given class to the given options array. *