Adding Fields on Registration Form

file uploadformsuser

I need to add a file upload field on the registration form to allow users to upload documents on their profile, how can I do that? Thanks.

Best Answer

Go to http://www.silksoftware.com/magento-module-creator/#.VG-SJ_nF9Zo and using its Module Creator to create a new module called "YourCustomerAttribute".

Set "Add Customer Attribute" to YES Make proper inputs and selections as you needed. Make sure to select the forms you needed the new attributes to be used. Generate the module. Upload the module to your Magento folder.

Modify located at app/design/frontend/base/default/template/persistent/customer/form/register.phtml and add:

<div class="input-box">
     <label for="YourAttributeName"><?php echo $this->__('YourAttributeName') ?><span class="required">*</span></label><br />
    <textarea rows="4" cols="50" name="YourAttributeName" id="YourAttributeID" value="<?php echo $this->htmlEscape($this->getFormData()->getYourAttributeName()) ?>" title="<?php echo $this->__('YourAttributeName') ?>" class="required-entry input-text" ></textarea>
    </div>

If you want customer to be able to modify the attribute in customer panel, then modify app/design/frontend/base/default/template/customer/form/edit.phtm and add:

 <li>
        <label for="YourAttributeName" class="required"><em>*</em><?php echo $this->__('YourAttributeName') ?></label>
        <div class="input-box">
            <textarea rows="4" cols="50" name="YourAttributeName" id="YourAttributeID" value="<?php echo $this->htmlEscape($this->getFormData()->getYourAttributeName()) ?>" title="<?php echo $this->__('YourAttributeName') ?>" class="required-entry input-text" ></textarea>
        </div>
    </li>
clear all caches.