How to Show Blank Password?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ethanlazarus
User
Posts: 63

How to Show Blank Password?

Post 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!


arbei
User
Posts: 9384

Post by arbei »

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


ethanlazarus
User
Posts: 63

Post by ethanlazarus »

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


arbei
User
Posts: 9384

Post 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.


Post Reply