Page 1 of 1

How to Show Blank Password?

Posted: Thu Mar 07, 2024 7:12 am
by ethanlazarus

In the old phpmaker 2018, if a password was blank, on edit screen, password box showed blank. In 2024 phpmaker, password box shows as "********"

Is it possible to put something in row_rendered so that on edit, if password is blank, field blank instead of "*********" - I figure this must be easy, but the fix is eluding me. Thanks!


Re: How to Show Blank Password?

Posted: Thu Mar 07, 2024 9:56 am
by arbei

You need to keep "********" or the script will consider the password has been changed.


Re: How to Show Blank Password?

Posted: Fri Mar 08, 2024 8:33 am
by ethanlazarus

How would I make it force blank in actually blank? Couldn't I pickup the change in edit -> custom validate?


Re: How to Show Blank Password?

Posted: Fri Mar 08, 2024 10:25 am
by arbei

I'm not sure what you meant by "force blank in actually blank" and "pickup the change in edit -> custom validate". If you meant you can detect if the password field is changed by Row_Updating server event, you can. You can set the EditValue of the password field as empty string in Row_Rendered. If the password field is blank (e.g. $rsnew["password"] == ""), you can unset the password field in Row_Updating (e.g. unset($rsnew["password"])). However, be aware that if the password input is shown as blank, the user might try to input something, then the password is changed accidentally. And you cannot distinguish if the field is actually empty or not.