Skip to content

Commit

Permalink
Revert dwightwatson#53 and document use of []
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightwatson committed May 11, 2016
1 parent f986a74 commit 396c252
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ View the method signature for configuration options.

```php
// A checked checkbox.
BootForm::checkbox('interests', 'Laravel', 'laravel', true);
BootForm::checkbox('interests[]', 'Laravel', 'laravel', true);
```

Same goes for radio inputs.
Expand All @@ -182,7 +182,7 @@ $interests = [
];

// Checkbox inputs with Laravel and Rails selected.
BootForm::checkboxes('interests', $label, $interests, ['laravel', 'rails']);
BootForm::checkboxes('interests[]', $label, $interests, ['laravel', 'rails']);

$genders = [
'male' => 'Male',
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public function checkboxes($name, $label = null, $choices = [], $checkedValues =
foreach ($choices as $value => $choiceLabel) {
$checked = in_array($value, (array) $checkedValues);

$elements .= $this->checkboxElement($name."[]", $choiceLabel, $value, $checked, $inline, $options);
$elements .= $this->checkboxElement($name, $choiceLabel, $value, $checked, $inline, $options);
}

$wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
Expand Down

0 comments on commit 396c252

Please sign in to comment.