'slides-form', 'action' => $url, 'onsubmit' => 'return false;', 'class' => 'modal-dashboard', 'enctype' => 'multipart/form-data', 'method' => 'POST', ]; $inputs[] = [ 'arguments' => [ 'type' => 'hidden', 'name' => 'refr', 'value' => $refr, ], ]; $inputs[] = [ 'arguments' => [ 'type' => 'hidden', 'name' => 'slides', 'value' => 1, ], ]; $inputs[] = [ 'arguments' => [ 'type' => 'hidden', 'name' => 'pure', 'value' => 1, ], ]; $fields = array_reduce( $dashboards, function ($carry, $item) { $carry[$item['id']] = $item['name']; return $carry; }, [] ); $inputs[] = [ 'id' => 'select-dashboard-slices', 'arguments' => [ 'type' => 'select', 'fields' => $fields, 'name' => 'slidesIds[]', 'selected' => '', 'return' => true, 'multiple' => true, 'sort' => false, ], ]; HTML::printForm( [ 'form' => $form, 'inputs' => $inputs, ] );