Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 855126e

Browse files
committed
Merge pull request #1 from 2brosdevelopment/feature/improveFormGroup
Add label options array to the signature of the openGroup method, so that you can do horizontal forms more easily
2 parents f982644 + 134aa4e commit 855126e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
composer.phar
33
composer.lock
44
.DS_Store
5+
.idea

src/Manavo/BootstrapForms/FormBuilder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ class FormBuilder extends IlluminateFormBuilder {
1919
* @param string $name
2020
* @param mixed $label
2121
* @param array $options
22+
* @param array $labelOptions
2223
* @return string
2324
*/
24-
public function openGroup($name, $label = null, $options = array())
25+
public function openGroup($name, $label = null, $options = array(), $labelOptions = array())
2526
{
2627
$options = $this->appendClassToOptions('form-group', $options);
2728

@@ -37,7 +38,7 @@ public function openGroup($name, $label = null, $options = array())
3738

3839
// If a label is given, we set it up here. Otherwise, we will just
3940
// set it to an empty string.
40-
$label = $label ? $this->label($name, $label) : '';
41+
$label = $label ? $this->label($name, $label, $labelOptions) : '';
4142

4243
return '<div'.$this->html->attributes($options).'>'.$label;
4344
}

0 commit comments

Comments
 (0)