Skip to content

Commit

Permalink
#67 include checkbox group memory
Browse files Browse the repository at this point in the history
  • Loading branch information
creecros committed Feb 24, 2021
1 parent 36c6c7f commit e45f191
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Helper/MetaHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ public function renderMetaListField($key, $values, array $list, $type, array $er
case "radio": $html .= $this->helper->form->radios('metamagikkey_' . $key, $map_list, $values); break;
case "list": $html .= $this->helper->form->select('metamagikkey_' . $key, $map_list, $values, $errors, $attributes, 'form-input-small'); break;
case "kvlist": $html .= $this->helper->form->select('metamagikkey_' . $key, $map_list, $values, $errors, $attributes, 'form-input-small'); break;
case "check": $html .= $this->helper->form->checkboxes('metamagikkey_' . $key . '[]', $map_list, $values); break;
case "check":
if ($this->valueCheck($key, $values)) {
$values['metamagikkey_' . $key . '[]'] = array();
foreach($values['metamagikkey_' . $key] as $reformatted_key => $value) {
foreach($value as $v) { $values['metamagikkey_' . $key . '[]'][$v] = $v; }
}
}
$html .= $this->helper->form->checkboxes('metamagikkey_' . $key . '[]', $map_list, $values); break;
}

return $html;
Expand Down

0 comments on commit e45f191

Please sign in to comment.