checkBoxListRow multiselect bug

Issue #6 resolved
Evgeny Vlasenko
created an issue

Bug with multiselect was in previous version of this extansion. And this bug is in latest version (changeset: 80:34b4cd826239)

Name of each checkbox would be "TestForm[checkboxes][]", but name is "TestForm[checkboxes]" - without last brackets (bootstrap-yii demo page)

Comments (6)

  1. Anonymous

    Hi Chris, I just added the following line to the inputsList method in BootActiveForm, if it helps save you some time at all:

    if ($checkbox && substr($name, -2) !== '[]') $name .= '[]';
  2. Anonymous

    Also had to update the foreach loop in the same method to use:

    $checked = !is_array($selection) && !strcmp($value,$selection) || is_array($selection) && in_array($value,$selection);
  3. Log in to comment