Extended Select element, with possiblity of selecting multiple values. Visual part is provided by
jquery.multiselect.js - drop-in replacement for the standard
<select>.
All required js and css files are included in vegas library.
Check installation guide for more details.
namespace Foo\Forms;
use Vegas\Forms\Element\MultiSelect;
class Bar extends \Vegas\Forms\Form
{
public function initialize()
{
$roles = new MultiSelect('roles');
$roles->getDecorator()->setTemplateName('jquery');
$roles->addOptions([
'key1' => 'value1',
'key2' => 'value2'
]);
$this->add($roles);
// ....
}
}