Database Reference
In-Depth Information
Finally, you need to change the item type of P610_PASSWORD to Password, so it
accepts a user's input but displays asterisk (*) characters as the password is typed. This
item type is designed not to retrieve data when a record is edited, despite being bound
to a database column. Also, the item type doesn't save any value in session state, mean-
ing it doesn't remember the value entered after the page processing is complete. This is
a security feature to prevent data identified as a password from being retrieved inappro-
priately. Here are the steps:
29. Edit
Page 610
.
30. Edit the item
P610_PASSWORD
.
31. Set
Display As
to
Password
, as shown in
Figure 9-18
.
Figure 9-18.
Setting the P610_PASSWORD element to a password field
Although you want a password to be required when creating a new account, if the
admin user doesn't enter a password while editing an existing user, you want the sys-
tem to keep the current password. Because of this, you need to set the Value Required
attribute of the password field to NO and instead implement a validation that only fires
when you're creating a new user:
32. In the
Settings
section of
P610_PASSWORD
, set the
Value Re-
quired
attribute to
NO
, and then click
Apply Changes
.
33. While editing
Page 610
, right-click
P610_PASSWORD
, and select
Create Validation
.
34. Set
Validation Name
to
P610_PASSWORD Is Not Null
, and click
Next
.
35. Select
Not Null
as
Validation Type
, and click
Next
.
36. Enter
A password must be specified.
for
Error Mes-
sage
, and click
Next
.