This topic is locked
[SOLVED]

 Confirm password field

2/21/2020 12:54:45 PM
PHPRunner General questions
woodey2002 author

Hi Guys,
What is the easiest way to add a confirm password field to the user registration form similar to image/link below?
https://xlinesoft.com/livedemo/todolist/register.php



I have been searching everywhere in settings but can't locate it, it would be great to learn how to do it for a field like e-mail also.
Any ideas would be much appreciated.
Thanks,

J

aadham 2/21/2020



Hi Guys,
What is the easiest way to add a confirm password field to the user registration form similar to image/link below?
https://xlinesoft.com/livedemo/todolist/register.php



I have been searching everywhere in settings but can't locate it, it would be great to learn how to do it for a field like e-mail also.
Any ideas would be much appreciated.
Thanks,

J


Hope this helps

Password Confirmation Field

jadachDevClub member 2/21/2020

You can create a copy of the field in the SQL editor using an alias such as Password as Password1
Make both Password and Password1 required
In events use custom add and enter something like

dynamic tblUsers = GlobalVars.dal.Table("Users");

tblUsers.Value["Username"] = values["Username"];

tblUsers.Value["Password"] = values["Password"];

tblUsers.Add();

return false;


Then javascript onload something like this

var ctrlPassword = Runner.getControl(pageid,'Password');

var ctrlPassword1 = Runner.getControl(pageid,'Password1');



ctrlPassword1.on('change', function(e){

if (ctrlPassword.getValue() != ctrlPassword1.getValue()){

alert("Passwords MUST match!!");

ctrlPassword.setValue('');

ctrlPassword1.setValue('');

ctrlPassword.setFocus();

}else{

// good to go

}

});
Admin 2/23/2020

The question sounds a bit strange to me as 'Confirm password' field is created on the Registration page by default.

jadachDevClub member 2/23/2020



The question sounds a bit strange to me as 'Confirm password' field is created on the Registration page by default.


I think he is asking for other fields such as username or email. I probably should not have used password as my example.

woodey2002 author 2/23/2020

Thanks for the code Jerry!
It was indeed the password confirm that I am after as I do not seem to have the confirm password as a built-in option in my current project!
However after seeing Sergey's comment I opened an older project and I can indeed see the 'Confirm password' field is created on the Registration page by default in that project.
So strangely I can't see it in my new project, therefore any ideas how I can get the same prebuilt 'Confirm password' in my current project?
In my current project I have reset the default registration page numerous times, I also can't see the option to insert the confirm password field either (which I think I should not need to do as my old project is the same i.e no need to insert password field).
The password field in my new project is set to varchar size 255 where my older project is set to varchar 50. Still can see the default 'Confirm password' field functionality no matter what I try.
Thanks again!

James

jadachDevClub member 2/23/2020

We are kind of getting off the original post here, but I will share with you one thought.
I did some customization on my registration page and lost the default confirm password. I simply added a new registration page and it came back (had to do the customization again however). I then made that my default registration page and all was good.

woodey2002 author 2/23/2020

Thanks Jerry,
That done the trick.
Cheers,

James