2 questions:
- How can I create select with multiple attribute in volt ?
{{ select_static('bon-cat[]', bon_cat, '', 'useEmpty': false, 'emptyText': '', 'class': 'form-control', "multiple":"multiple") }}
it creates select with multiple="multiple"... I want simple multiple.
2.How can I set default selected values (more than 1) for multi select?
$this->tag->setDefault("bon-cat", $bon_cat);
where $bon_cat is an array, gives me :
Fatal error: Uncaught exception 'Phalcon\Tag\Exception' with message 'Only scalar values can be assigned to UI components' in phalcon/dispatcher.zep:585 Stack trace: #0 /Users/IGonza/git//app/controllers/JobController.php(58): Phalcon\Tag::setDefault('bon-cat', Array) #1 [internal function]: JobController->addAction() #2 [internal function]: Phalcon\Dispatcher->dispatch() #3 /Users/IGonza/git/xxx/public/index.php(33): Phalcon\Mvc\Application->handle() #4 {main} thrown in phalcon/dispatcher.zep on line 585