I've just finished building an extended password policy module, which allows for customisable control over the rules for creating/updating a password.

The general idea is that you can set the minimum characters, whether the password should contain a special character, uppercase character, etc...

The module works as expected, however, there is no indication to the admin what rules he needs to follow when creating/updating an account.

I've found the form I need to update, Mage_Adminhtml_Block_Permissions_User_Edit_Tab_Main, and the field that needs editting and the property that needs adding:

$fieldset->addField('password', 'password', array(
    'after_element_html' => '<small># Output Rules Here #</small>',

My problem is I don't really want to extend the Mage_Adminhtml_Block_Permissions_User_Edit_Tab_Main class and rewrite the entire _prepareForm() method, it'd be preferable to target that particular form and that particular field and update the properties, but I can't seem to find out if that is even possible.

Any help would be appreciated.

  • Is it possible to update the field theough jQuery once the form elements are loaded in page? – Kavitha mano May 11 '18 at 7:46
  • Ideally not, would be looking more for a way to extend the core. – MCMXCII May 11 '18 at 8:33

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.