Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Commit

Permalink
fixes 47
Browse files Browse the repository at this point in the history
  • Loading branch information
uttkarsh@axelerant.com committed Mar 28, 2019
1 parent 00e500e commit 11329fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Element/TemplateCollectionList.php
Expand Up @@ -64,10 +64,12 @@ public static function processTemplateCollectionList(&$element, FormStateInterfa
// Add empty checkboxes form item. This will ensure 'checkboxes' always
// exists in $form_state values. This is only an issue if there are no
// checkboxes rendered initially (list is empty).
$element['checkboxes'] = [
'#type' => 'checkboxes',
'#options' => NULL,
];
if (!$element['#checkboxes']) {
$element['checkboxes'] = [
'#type' => 'checkboxes',
'#options' => [],
];
}

if ($element['#checkboxes']) {
$element['template_collection_list']['#attributes']['class'][] = 'checkboxes';
Expand Down

0 comments on commit 11329fc

Please sign in to comment.