title: How to dynamically populate a choices widget in symfony?
body: <p>Suppose there is an <code>image_url</code> column in database.</p>
  
  <p>I want the user to choose from several recommended images,which is something like this:</p>
  
  <pre><code>&lt;input type="radio" value="domain.com/path_to_img1" name="image_url" /&gt;
  &lt;img src="domain.com/path_to_img1" /&gt;
  &lt;input type="radio" value="domain.com/path_to_img2" name="image_url" /&gt;
  &lt;img src="domain.com/path_to_img2" /&gt;
  </code></pre>
  
  <p>Where the image urls are generated on the fly.</p>
  
  <p>How to do this in a symfony flavor by <code>sfForm</code>?</p>
  
  <p>I tried this:</p>
  
  <pre><code>$form-&gt;widgetSchema['key'] = new sfWidgetFormSelect(...)
  </code></pre>
  
  <p>But get a fatal error:</p>
  
  <blockquote>
    <p>Cannot access protected property</p>
  </blockquote>
  
  <p>But what's the exact way to do this?</p>