title: cakephp form input and url params
body: <p>I have a form that takes some input from a user and then gets redirected to a new page/function of the controller, I need to post.redirect.get the param so that I can use the <code>id</code> of the <code>invoice</code> on the next page.</p>
  
  <p>here is the first controller(where information is added)</p>
  
  <pre><code>public function add(){
      $this-&gt;set('title_for_layout', 'Create Invoice');
      $this-&gt;set('stylesheet_used', 'homestyle');
      $this-&gt;set('image_used', 'eBOXLogoHome.png');   
      $this-&gt;layout='home_layout';
  
      if($this-&gt;request-&gt;is('post')){
  
  
          //$this-&gt;Invoice-&gt;create();
          if(($this-&gt;Invoice-&gt;set($this-&gt;request-&gt;data))){
              $this-&gt;Session-&gt;setFlash('The invoice has been saved');
              $data=$this-&gt;request-&gt;data;
              if($this-&gt;Invoice-&gt;saveAll($data,array('validate'=&gt;false))){
              $this-&gt;Session-&gt;setFlash(__('Invoice Created'));
              $this-&gt;redirect(array(
              'controller' =&gt; 'invoices','action' =&gt; 'create',
              $this-&gt;data['invoices']['id']));
              }
      }}
      else
      {
          $this-&gt;Session-&gt;setFlash('The invoice could not be saved. Please, try again.');
      }
  
       $templates=$this-&gt;Template-&gt;find('list', array(
      'fields'=&gt;array('name'),
      'conditions' =&gt; array(
      'account_id' =&gt; $this-&gt;Auth-&gt;user('account_id'))));
  
      $accounts2=$this-&gt;User-&gt;find('list', array(
      'fields'=&gt;array('account_id'),
      'conditions' =&gt; array(
      'id' =&gt; $this-&gt;Auth-&gt;user('id'))));
  
      $sendername=$this-&gt;Account-&gt;find('list', array(
      'fields'=&gt;array('company_name'),'conditions' =&gt; array(
      'id' =&gt; $accounts2)));
  
      $accounts=$this-&gt;User-&gt;Relationship-&gt;find('list', array(
      'fields'=&gt;array('receiver_id'),
      'conditions' =&gt; array(
      'sender_id' =&gt; $accounts2)));
  
      $receivername=$this-&gt;Account-&gt;find('list', array(
      'fields'=&gt;array('company_name'),'conditions'=&gt;array(
      'id' =&gt; $accounts)));
  
      $this-&gt;set('accounts', $accounts);
      $this-&gt;set('accounts2', $accounts2);
      $this-&gt;set('sendername', $sendername);
      $this-&gt;set('receivername', $receivername);
      $this-&gt;set('template', $templates);
  
  
    }
  </code></pre>
  
  <p>here is the view </p>
  
  <h2>Create a New Invoice</h2>
  
  <pre><code>&lt;?php
  
  
  echo $this-&gt;Form-&gt;create('Invoice', array('action'=&gt;'add'));
  
  
  echo $this-&gt;Form-&gt;input('id',array('type'=&gt;'hidden'));
  echo $this-&gt;Form-&gt;input('sender_id', array('label' =&gt;'Sender: ', 'type' =&gt; 'select', 'options' =&gt; $sendername));
  echo $this-&gt;Form-&gt;input('receiver_id',array('label'=&gt;'Receiver: ', 'type' =&gt; 'select', 'options' =&gt; $receivername));
  echo $this-&gt;Form-&gt;input('active', array('label' =&gt; 'Schedule?', 'options' =&gt; array('1'=&gt;'Send','0'=&gt;'Schedule'), 'default'=&gt;'1'));
  echo $this-&gt;Form-&gt;input('templates_id', array('label'=&gt;'Template: ','type'=&gt;'select','options'=&gt;$template));
  echo $this-&gt;Form-&gt;end('Submit');
  
  
  ?&gt;
  </code></pre>
  
  <p>and here is the controller that I want to pass the param too</p>
  
  <pre><code>public function create($id)
      {   
  $fields = $this-&gt;Template-&gt;Field-&gt;find('all',array( 
            'conditions' =&gt; array(
            'template_id'=&gt; $id,
           'Field.active'=&gt;true)));
          if(empty($this-&gt;data)){
              $this-&gt;data= $this-&gt;Template-&gt;read(NULL, $id);
          } 
          else{
              if(($this-&gt;Template-&gt;save($this-&gt;data)))
              {
                  $this-&gt;Session-&gt;setFlash('The template has been updated');
                  $this-&gt;redirect(array('controller'=&gt;'Templates', 'action'=&gt;'view'));
  
              }
          }
  
       }
            $this-&gt;set('field', $fields);
  
  
      }
  </code></pre>