Permalink
Browse files

fix(views): passing 'default' to input/checkboxes now works

fixes #8560
  • Loading branch information...
jdalsem committed Apr 12, 2016
1 parent c7c5779 commit efa6395f575973c0f588028c81acdc5446421970
Showing with 2 additions and 2 deletions.
  1. +2 −2 views/default/input/checkboxes.php
@@ -7,7 +7,7 @@
* to make sure something is sent to the server. The default value is 0.
* If using JS, be specific to avoid selecting the hidden default value:
* $('input[type=checkbox][name=name]')
- *
+ *
* @warning Passing integers as labels does not currently work due to a
* deprecated hack that will be removed in Elgg 1.9. To use integer labels,
* the labels must be character codes: 1 would be 1
@@ -68,7 +68,7 @@
// include a default value so if nothing is checked 0 will be passed.
if ($vars['name'] && $vars['default'] !== false) {
- echo elgg_view('input/hidden', ['name' => $vars['name'], 'value' => $default]);
+ echo elgg_view('input/hidden', ['name' => $vars['name'], 'value' => $vars['default']]);
}
$checkboxes = '';

0 comments on commit efa6395

Please sign in to comment.