title: CakePHP - Select box item not properly appearing in POSTED data
body: <p>I have the following select box with CakePHP.</p>
  
  <pre><code>//Users/settings.ctp
  
  $options = array('NYC', 'LA');      
  
      echo $this-&gt;Form-&gt;create('Location');
      echo $this-&gt;Form-&gt;input('Location', array('type' =&gt; 'select', 'options' =&gt; $options)); 
      echo $this-&gt;Form-&gt;end(__('Submit')); 
  </code></pre>
  
  <p>In the UsersController I have</p>
  
  <pre><code>public function settings($id = null){
      if ($this-&gt;request-&gt;is('post')) {
          $location = $this-&gt;request-&gt;data;
          //$location = $location['Location']['Location'][0];
          $this-&gt;Session-&gt;setFlash( __(print_r($location))); //displays '1' in the alert no matter the selection
      }
  }
  </code></pre>
  
  <p>When I use print_r on the raw data it shows the following.</p>
  
  <pre><code>Array ( [Location] =&gt; Array ( [Location] =&gt; 0 ) )
  </code></pre>
  
  <p>So I have two problems</p>
  
  <ol>
  <li>The index of the item is being selected, not the item itself </li>
  <li>The setFlash window always displays '1'. I need to do some string manipulation after I get the listbox working and it's nice to see the output. </li>
  </ol>
  
  <p><strong>update - I went into /Cake/View/Helper/FormHelper.php and did some digging</strong></p>
  
  <p>I did a print_r on the following line</p>
  
  <pre><code>$attributes = $this-&gt;_initInputField($fieldName, array_merge(
          (array)$attributes, array('secure' =&gt; self::SECURE_SKIP)
      ));
  </code></pre>
  
  <p>Which resulted in </p>
  
  <pre><code>Array ( [value] =&gt; 0 [class] =&gt; [name] =&gt; data[Users][Location] [id] =&gt; UsersLocation )
  </code></pre>
  
  <p>The value being passed is 0, I don't see the location anywhere</p>