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

Phalcon Select field sort options

Hello How to sort, items in select field ? Because i have prepared the field and added options into it, but the empty value is last ....

$plan = new \Phalcon\Forms\Element\Select('plan',null,array(
    'useEmpty' => true,
    'emptyText' => $lang->translate("Vyberte tarif pro zařízení."),
    'emptyValue' => null
));


2.5k

In the select you are providing null as your list of items, is that correct?