How to show 2 instances of the user profile form, displaying different form modes, on the same page? I would like to show 2 instances of the User Profile edit form on the same page.  One form mode only shows the username/password widget with the submit button.  The other form mode only shows the contact information with the submit button.

When I try the following, I get Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "user" entity type did not specify a "user.change_password" form class.  Note that I've changed the form class to change_password as well.

$user = User::loadMultiple([$this-&gt;account-&gt;id()]);
$form = $this-&gt;entityFormBuilder-&gt;getForm($user[$this-&gt;account-&gt;id(), 'change_password']


I asked a similar question regarding custom entities but using that solution would require modifying core files.

Is it possible to do this?
You don't need to modify core files, you can modify the "user" entity type in a hook. This is how you add a form class for the form operation change_password:

mymodule.module

function mymodule_entity_type_build(array &amp;$entity_types) {
  $entity_types['user']-&gt;setFormClass('change_password', 'Drupal\user\ProfileForm');
}