We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

in Phalcon\Forms\Element\Select can't set array to element

Phalson version 2.0.3 in object Phalcon\Forms\Element\Select

$select->setDefault(array('test 1', 'test 2'));
$value = $select->getValue();
var_dump($value);

string('test 2');

So return last element from array



7.0k
edited Jul '15

Maybe there the default value mean the default selected value in your select element.

The selectable values itself you define in the constructor of Phalcon\FormsElement\Select, doesn't you?