Password with Confirm

Mark Elliott asked on March 4, 2016 20:38

On the Password with Confirm control is there any way to add a label to the confirm textbox?

Recent Answers

Bryan Soltis answered on March 7, 2016 16:56

Hi mark,

Which control are you referring to? The CMSWebParts/Membership/Profile/ChangePassword.aspx webpart has a label for the confirm textbox already (lblConfirmPassword).

Are you referring to another control somwhere else?

  • Bryan
0 votesVote for this answer Mark as a Correct answer

Dennis Hulsmans answered on September 26, 2016 13:35 (last edited on September 26, 2016 13:35)

Hi Mark

I noticed the same problem too. Although the normal registration form there is a field you can set. When you use the custom registration form control, there is absolutely nothing you can set. If you look into the code of the form control "Password with confirmation" (/CMSModules/Membership/FormControls/Passwords/PasswordConfirmator.ascx), you'll notice the label field is set to display="false" <cms:LocalizedLabel ID="lblConfirmPassword" runat="server" ResourceString="general.confirmpassword" AssociatedControlID="txtConfirmPassword" EnableViewState="false" Display="false" />

In de asxc.cs file of this control you'll see the value will never get the value true. Even worse, you can't find this label in the ascx.cs code. The textbox will be set to true, but the label won't be

public override bool Enabled
            return base.Enabled;
            base.Enabled = value;
            **txtConfirmPassword.Enabled = value;**
            passStrength.Enabled = value;

Seems like a bug to me. I reported it, but you could create your own form control based on the existing one and just add the lblConfirmPassword.enabled = value; inside the function above

KR, Dennis

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.