title: Magento contact form customizations
body: <p>I'm trying to add a couple fields to the contact form so that my customers can indicate the year make and model of their vehicle when writing.</p>
  
  <p>I have just upgraded my Magento installation from 1.4.3 to 1.7.0.1. My previous contact form was a hack job and this time I'm trying to get it working the right way. Reading all around, I tried adding <code>&lt;input type="text" size="15" value="" id="model_ext" name="bike_model_ext" class="required-entry input-text"&gt;</code> to the form.phtml in my template and then in the transaction email template in admin, <code>{{var data.model_ext}}</code>. But that doesn't work. I ensured that the template in the back end is correct by manipulating the text. I also know the form.phtml is correct, as I see elements when they change.</p>
  
  <p>So then I overloaded the controller handling the contact form. I confirmed my controller is handling it (it came with a <code>echo "it works"; die();</code>) And in there, I'm looking for the POST data of the extra form element names, but here, too, I'm having troubles getting access to the data. Looking around the net, I tried this:</p>
  
  <pre><code>            $comment = $this-&gt;getRequest()-&gt;getPost('comment');
              $extras=Array( "year","make","model","model_ext" );
              foreach($extras as $field)
                      $comment .= "\n$field:\t".$this-&gt;getRequest()-&gt;getPost($field);
              $this-&gt;getRequest()-&gt;setParam('comment', $comment);
              parent::postAction();
  </code></pre>
  
  <p>But again, it is like my variables do not exist. Here, again, I know my code is being executed, because when I get anything wrong in there, the contact form crashes to an error message. </p>
  
  <p>I'll be on it again in the morning, but hope that there is something easy I'm missing that someone here with more experience can help me with.</p>
  
  <p><strong>EDIT: ANSWERED</strong> I was using the ID to key in for the variables, needs to instead be the name. </p>