Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions

hiding value in ConfirmedPasswordField


Reply

380 Views

Avatar
sajok

6 July 2012 at 9:52am (Last edited: 6 July 2012 10:04am), Community Member, 82 Posts

Hello,

I have a member profile edit page with a ConfirmedPasswordField that shows two fields to check the password. The problem is when a member visits this page to edit their profile, they see both password fields with long dotted passwords. I tried to hide that password value and show blank fields instead using this code:

$password = new ConfirmedPasswordField('Password',null,null,null,false);

$password->setCanBeEmpty(true);

$member->Password = '';

this works and shows blank password fields, but when I save the form without making any changes, the password get overridden and I can no longer login with the old password.

In this api page for the ConfirmedPasswordField class, somebody suggested to add $member->Password = ''; before $form>saveInto() and not calling writ(), but the write call() is already their under saveInto();

I just want to shows black fields for password instead of the long dotted value.. any help?