This will not work in 5.3 either because ``addPasswordField`` is private.
But why are you putting the logic in a method of the form field (creating all sort of issues to call it from inside the closure) instead of putting the ``add`` call here directly ?