title: How to pass variable from action to form
body: <p>I am sure I am going about this the wrong way, but I need to unset an array key from one of my choices in a sfWidgetFormChoice.  The only way to get that variable to the Form is from the action.  Here's what I have:</p>
  
  <p>Action:</p>
  
  <pre><code>$id = $request-&gt;getParameter('id');
  $deleteForm = new UserDeleteForm();
  $choices = array();
  $choices = $deleteForm-&gt;getWidgetSchema('user')-&gt;getAttribute('choices');
  unset($choices[$id]);  //I obviously don't want the user to be able to transfer to the user being deleted
  $this-&gt;deleteForm = $deleteForm;
  </code></pre>
  
  <p>Form:</p>
  
  <pre><code>$users = Doctrine_Core::getTable('sfGuardUser')-&gt;getAllCorpUsers()-&gt;execute();
  $names = array();
      foreach($users as $userValue){
          $names[$userValue-&gt;getId()] = $userValue-&gt;getProfile()-&gt;getFullName();
      };
  //        unset($names[$id]);  //this works, but I can't figure out how to get $id here.
      $this-&gt;widgetSchema['user'] = new sfWidgetFormChoice(array(
          'choices'   =&gt; $names
      ));
      $this-&gt;validatorSchema['user'] = new sfValidatorChoice(array(
          'required'  =&gt; true,
          'choices'   =&gt; $names
      ));
  </code></pre>