title: CakePHP - Populating search form with previous search values
body: <p>My index.ctp has a search form with 2 input fields. One is a name field based on model field BillingCenter.name, and another is a date field which is not linked to a model field. 
  Pressing search will pass parameters via URL to the action "Search".</p>
  
  <p>index.ctp</p>
  
  <pre><code>echo $this-&gt;Form-&gt;create('BillingCenter', array('type' =&gt; 'get', 'action' =&gt; 'search'));
  
  echo $this-&gt;Form-&gt;input('BillingCenter.name');
  
  echo $this-&gt;Form-&gt;input('date', array(
  'type'  =&gt; 'date',
  'label' =&gt; 'Date',
  'empty' =&gt; TRUE,
  'minYear' =&gt; 2000,
  'dateFormat' =&gt; 'DMY',
  'maxYear' =&gt; date('Y'),
  'minYear' =&gt; date('Y') - 10
  # default order m/d/y
  ));
  
  echo $this-&gt;Form-&gt;end('Search');
  </code></pre>
  
  <p>When I click search it generates not so nice-looking URL like this:</p>
  
  <pre><code>http://localhost/bm/billing_centers/search?name=jo&amp;date%5Bday%5D=01&amp;date%5Bmonth%5D=03&amp;date%5Byear%5D=2014
  </code></pre>
  
  <p>This is the simple "Search" action in my controller.</p>
  
  <pre><code>public function search() {
  
      $this-&gt;view = 'index';
  
      if (!isset($this-&gt;request-&gt;query['name']) OR !isset($this-&gt;request-&gt;query['date'])) {
          throw new BadRequestException();
      }
  
      //concatenate date from URL                     
      $effectivedate = $this-&gt;request-&gt;query['date']['year'] . $this-&gt;request-&gt;query['date']['month'] . $this-&gt;request-&gt;query['date']['day'];
  
      //assemble the search conditions 
      $searchfilter = array(
                          'BillingCenter.name LIKE' =&gt; '%' . $this-&gt;request-&gt;query['name'] . '%',
                          'BillingCenter.startdate    &lt;=' =&gt; $effectivedate,
                          'BillingCenter.enddate      &gt;=' =&gt; $effectivedate
                          );
  
      $this-&gt;set('billingcenters', $this-&gt;BillingCenter-&gt;find('all', array('conditions' =&gt; $searchfilter     )));
  </code></pre>
  
  <p>The search seems to work fine (please comment if anything i do above is bad practice).
  The search leads back to the same index.ctp and shows the correct search results.</p>
  
  <p>HOWEVER, I need the search form input field values to default to the values submitted in the previous search, how can i get these <strong>values (presumably from the URL), and auto populate</strong> the <strong>text input</strong> and <strong>date input</strong> fields?</p>
  
  <p>Cheers
  Kevin</p>