diff --git a/src/Forms/ConfirmedPasswordField.php b/src/Forms/ConfirmedPasswordField.php index 5cd8ece1e57..395bc250679 100644 --- a/src/Forms/ConfirmedPasswordField.php +++ b/src/Forms/ConfirmedPasswordField.php @@ -694,4 +694,22 @@ public function getRequireStrongPassword() { return $this->requireStrongPassword; } + + /** + * Set the container form. + * + * This is called automatically when fields are added to forms. + * + * @param Form $form + * + * @return $this + */ + public function setForm($form) + { + $this->getPasswordField()->setForm($form); + $this->getConfirmPasswordField()->setForm($form); + + parent::setForm($form); + return $this; + } }