Select tag "using" with more fields


I need to concatenate 3 field to use in select options:

<?php echo \Phalcon\Tag::select(array(
                    Caracteristicas::find("nome = 'RAM'") , 
                    "using" => array("id","descricao"), 
                    'multiple' => 'multiple',
                    "class" => "form-control")) 

I need the id plus another field wich is 3 filed concatenated. It's possible ?

thx CV

I'm using select in a slightly different way, than you do, but what you are asking for is possible in Phalcon, have a look at my answer on a different topic

If you cannot do anything with that have a look at

It pretty much boils down to working with a result of find() method first and then adding it to select.

Take care.

I personally used a slightly different approach. I provided Model::find() with some parameters to resolve my problem which is a name stored in three different columns. It works perfectly for me.

//Parameters to use when fetching the agent_id object
$agent_params =  [
        'conditions'  => 'designation_id = "2" AND status = "1"',
        'columns'     => 'id, CONCAT(first_name," ",middle_name," ",last_name) AS name',
        'order'       => 'name'
//define agent_id
$agent_id = new Select('agent_id', 
                'using'       => [ 'id','name'  ],
                'useEmpty'    => true,
                'emptyText'   => 'Please Select Agent',
                'emptyValue'  => '',