skip to Main Content

I want to add some custom fields using my block.
Problem is that block is not rendering inside the form tag or before the submit button(see the screenshot 1).

Screenshot 1

This is the code of rendering the block on Account edit page:

<?xml version="1.0" encoding="UTF-8"?>
<layout version="1.0.0">
    <customer_account_edit>
        <reference name="my.account.wrapper">
                    <block type="customfield/Register" name="customfield_registrationnnn" template="vss_customfield/register.phtml" />
        </reference>
    </customer_account_edit>
</layout>

2

Answers


  1. Just use before =” module name of magento”.
    You can insert your code before magento

    Login or Signup to reply.
  2. Actually there is no hook/handle to insert new/custom fields in account edit form.

    Either you can overwrite the customer/form/edit.phtml in your module’s layout file.

    1) Put below snippet in your module’s layout XML.

    <customer_account_edit>
        <reference name="customer_edit">
            <action method="setTemplate">
                <template>yourModule/customer/form/edit.phtml</template>
            </action>
        </reference>
    </customer_account_edit>
    

    2) Copy your theme’s

    customer/form/edit.phtml

    to

    yourModule/customer/form/edit.phtml

    3) Now in your new file, you can put your custom fields.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search