Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorkatun
     

    Hi,

    I'm trying to fill up a select box from an Object of my controller.

    Here the code of my controller:

    function add() 
    {
        $this->customers =& $this->Customers->find('all');
        ...
        ...
    }
    

    And here the code of my template

    <%= select_tag customer_name,null,{customers} %> 
    

    Is this the right way? Or how I get it working?

    greets

    • CommentAuthorkatun
     

    I realized it in the template like this

    <select id="customer" name="customer">
      {loop customers}
      <option value="{customer.id}">{customer.name} {customer.firstname}</option>
      {end}
    </select>