title: Magento - Add a custom field in Review form
body: <p>I am looking forward to create a custom module which adds an input field to collect 'Email Id' in Review form but only for Guest Customers. </p>
  
  <p>I know this probably needs rewriting some of the core modules like '/code/core/Mage/Review/Model/Mysql4/Review/Product/Collection.php' and '/code/core/Mage/Review/Model/Mysql4/Review.php' and editing block files and .phtml files to include the 'email' text field.</p>
  
  <p>Also the new field needs to be added to the database table as well. And this field should compulsorily be there for the Guest Customers. Registered Customers need not enter their email id while posting a Review.</p>
  
  <p>So I don't know how to go about doing the following things:
  1)Which core files needs to be rewritten exactly ?
  2)How should I go about adding this new field in the existing database table for 'review' such that future upgrades don't over write it ?
  3)How should I make sure that this field is mandatorily filled by Guest Customers? (Its ok if registered customers don't fill it)</p>
  
  <p>Please, any help is massively appreciated. Thanks.</p>
  
  <hr>
  
  <p>This is what I have done so far</p>
  
  <pre><code>CM
   Review
    Block
       Review
         Edit
           Form.php
    etc
      config.xml
    Helper
      Data.php
    Model
      Resource
        Review.php
        Review
          Product
            Collection.php
  </code></pre>
  
  <p>This are the contents of my config.xml</p>
  
  <pre><code> &lt;?xml version="1.0"?&gt;
   &lt;config&gt;
  &lt;modules&gt;
      &lt;CM_Review&gt;
          &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;/CM_Review&gt;
  &lt;/modules&gt;
  &lt;frontend&gt;
      &lt;routers&gt;
          &lt;review&gt;
              &lt;use&gt;standard&lt;/use&gt;
              &lt;args&gt;
                  &lt;module&gt;CM_Review&lt;/module&gt;
                  &lt;frontName&gt;Review&lt;/frontName&gt;
              &lt;/args&gt;
          &lt;/review&gt;
      &lt;/routers&gt;
  &lt;/frontend&gt;    
  &lt;global&gt;
      &lt;blocks&gt;
          &lt;adminhtml&gt;
              &lt;rewrite&gt;
              &lt;review_edit_form&gt;CM_Review_Block_Review_Edit_Form&lt;/review_edit_form&gt;
              &lt;/rewrite&gt;
          &lt;/adminhtml&gt;
      &lt;/blocks&gt;
      &lt;helpers&gt;
          &lt;review&gt;
         &lt;rewrite&gt;
                  &lt;class&gt;CM_Review_Helper&lt;/class&gt;
      &lt;/rewrite&gt;
          &lt;/review&gt;
           &lt;/helpers&gt;  
      &lt;models&gt;
            &lt;review&gt;
            &lt;rewrite&gt;
          &lt;resource_review&gt;CM_Review_Model_Resource_Review&lt;/resource_review&gt;
                      &lt;resource_review_product_collection&gt;
                        CM_Review_Model_Resource_Review_Product_Collection
                      &lt;/resource_review_product_collection&gt;
           &lt;/rewrite&gt;
           &lt;/review&gt;
            &lt;/models&gt;
  &lt;/global&gt;
  </code></pre>
  
  <p></p>
  
  <p>And each of the core files that I have rewritten, are extended them from the original Review Model files and Adminhtml/Block/Review Edit files.I have copy pasted the same code just with the extra 'email' field in my code.</p>
  
  <p>I have manually added the field in the database now and have added the input field in base/defaut/review/form.phtml but still it doesn't save the data in the table.</p>
  
  <p>However if I try to add this field by editing the core files then it saves the email id of guest customers and works perfectly fine.</p>
  
  <p>Can't figure out what I'm doing wrong? </p>