title: Symfony2 choice with static list
body: <p>I want to use a select box with predefined values. I have a Task entity:</p>
  
  <pre><code>namespace xx\xxx\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use Symfony\Component\Validator\Constraints as Assert;
  /**
   * Task
   *
   * @ORM\Table()
   * @ORM\Entity(repositoryClass="xx\xxx\Entity\TaskRepository")
   */
  class Task
  {
  
  ////
  
  /**
   * @Assert\Choice(choices = {"MONTHLY", "WEEKLY"}, message = "Select frequency")
   * @ORM\Column(name="frequency", type="text")
   */
  private $frequency;    
  }
  </code></pre>
  
  <p>When using TaskType:</p>
  
  <pre><code>$builder-&gt;add('frequency');
  </code></pre>
  
  <p>shows input, which validates correctly - allows only WEEKLY and MONTHLY values. But I want to use select box. I have tried:</p>
  
  <pre><code>   $builder-&gt;add('frequency', 'collection', array(
             'type' =&gt; 'choice',
             'options' =&gt; array(
                 'choices' =&gt; array(
                     'MONTHLY' =&gt; 'Monthly',
                     'WEEKLY' =&gt; 'Weekly',
                 )
             )
         )
     )
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>   $builder-&gt;add('frequency', 'collection', array(
             'type' =&gt; 'choice',
         )
     )
  </code></pre>
  
  <p>but both ways I only get a label with no select box. What I am doing wrong? Maybe there is better approach?</p>