Step 1: Open the file Account.php in the below path appcodecoreMageAdminhtmlBlockCustomerEditTabAccount.php Step 2: Around line 163 the password fieldset code will exist as shown
1 2 3 4 5 6 7 8 9 10 11 12 |
$newFieldset = $form->addFieldset( 'password_fieldset', array('legend'=>Mage::helper('customer')->__('Password Management')) ); $field = $newFieldset->addField('password', 'text', array( 'label' => Mage::helper('customer')->__('Password'), 'class' => 'input-text required-entry validate-password', 'name' => 'password', 'required' => true ) ); |
Step 3: Add the Below code after the fieldset,but just before the setRendered method call. As shown below
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$newFieldset = $form->addFieldset( 'password_fieldset', array('legend'=>Mage::helper('customer')->__('Password Management')) ); $field = $newFieldset->addField('password', 'text', array( 'label' => Mage::helper('customer')->__('Password'), 'class' => 'input-text required-entry validate-password', 'name' => 'password', // This name is set as first argument in setData 'required' => true ) ); $customer->setData('password', 'mynewpass'); // Your default new password here $field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass')); |
Here the first argument to the setData is the name field … Continue Reading