title: BelongsTo problem in cakephp and html select, i can't understand how to do that
body: <p>Simple question by a cakephp noob:</p>
  
  <p>i have two models, Player and Team.</p>
  
  <p>Team has an id (int) and a cool_name (varchar).</p>
  
  <p>Player has an id (int), a cool_name (varchar) and a reference for the team table, team_id (int).</p>
  
  <p>Cool_name instead of name because i don't have tables in english, so i can't use the field 'name'.</p>
  
  <p>So, a team hasMany players and a player belongsTo team.</p>
  
  <p>My Player model:</p>
  
  <pre><code>class Player extends AppModel {
      var $name = 'Player';
      var $belongsTo = array('Team');
  }
  </code></pre>
  
  <p>(Team model has nothing other than name inside)</p>
  
  <p>PlayersController:</p>
  
  <pre><code>class PlayersController extends AppController {
      var $name = 'Players';
  
      function add() {
            $this-&gt;set('teams', $this-&gt;Player-&gt;Team-&gt;find('list'));
     //then save... 
      }
  </code></pre>
  
  <p>In the add view of the player: </p>
  
  <pre><code>//...
  echo $form-&gt;input('squadra_id');
  //...
  </code></pre>
  
  <p>Ok so i have a select with the team ids inside; i don't want the id, but the name of the team and then save the id: something like (in html)</p>
  
  <pre><code>&lt;select name="data[Player][team_id]" id="PlayerTeamId"&gt;
  &lt;option value="1"&gt;Cool Name 1&lt;/option&gt;
  
  &lt;option value="2"&gt;Cool Name 2&lt;/option&gt;
  &lt;!-- --&gt;
  &lt;option value="{team id}"&gt;{team cool name}&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>How can i do?</p>
  
  <ul>
  <li><strong>Solution</strong> -</li>
  </ul>
  
  <p>instead of </p>
  
  <pre><code>$this-&gt;set('teams', $this-&gt;Player-&gt;Team-&gt;find('list'));
  </code></pre>
  
  <p>put this</p>
  
  <pre><code>$this-&gt;set('teams', $this-&gt;Player-&gt;Team-&gt;find('list', array('fields' =&gt; array('cool name') ) ) );
  </code></pre>