Hello!
Using php 5.6 and Phalcon 2.0 + Plugin Jquery Select2 Version: 3.5.2 From plugin documentation:
The placeholder can be declared via a data-placeholder attribute attached to the select, or via the placeholder configuration element
And
When placeholder is used for a non-multi-value select box, it requires that you include an empty <option></option> tag as your first option.
In my code I use Forms and Select tag:
$accounts = new Select(
'accountid',
$options['accounts'],
array(
'using' => array('id','name'),
'useEmpty' => false
)
);
$accounts->setLabel('Account');
$this->add($accounts);
Help: How add empty option, like this: <option></option> before other options ?