2

How can I add a paragraph and extra fields in Registration Form?

1 Answer 1

4

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

  1. Set "Add Customer Attribute" to YES
  2. Make proper inputs and selections as you needed.
  3. Make sure to select the forms you needed the new attributes to be used.
  4. Generate the module.
  5. Upload the module to your Magento folder.
  6. 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>
    
  7. 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>
    
  8. Refresh all caches.

6
  • Which Magento version(s) is this compatible with?
    – rybo111
    Apr 20, 2015 at 16:12
  • 1
    Its customization so u can use above 1.5 version
    – Keyul Shah
    Apr 20, 2015 at 17:04
  • 3
    How would <select> options be added to the HTML?
    – rybo111
    Apr 21, 2015 at 13:34
  • I am confused how we can implement this thing,
    – Keyul Shah
    Apr 22, 2015 at 4:21
  • 3
    Don't tell people to change core code.
    – CarComp
    Oct 29, 2015 at 16:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.