This topic is locked

add validation password field

7/28/2010 10:45:36 AM
PHPRunner General questions
B
bedri author

Hello,
I have made an interface and every user have access just to it's password, but when a user edits his password there is just one field showing the password, I need to clear this field filled with the current password, add another two fields below saying "New password" and "Confirm password" and then to check the last two fields if they match, Also I want the first field to match the current password in PostgreSQL database.
Example:

____

|

| Old password:


| New Password: _____


| Confirm password: _____*

|

| [Update]

|____
I have the first field, but I want that to be clear 'no text', also add the another two fields matching each other after UPDATE, and finally insert them in database...
OK I hope You can understand

MANY THANKS.

A
ann 7/29/2010

Bedri,
such page can be created only manually based on the usual edit page.

Also you need to create two additional fields in the table, then you can add them two the Edit page.

Use Before record updated or JavaScript Onload event then to verify equality of the fields and save new password.

To clear the first field use JavaScript Onload event on the Events tab.

Here is a sample:

var ctrl = Runner.getControl(pageid, 'OldPasswordField');

ctrl.setValue("");