Hello,
On the User settings page (www.example.com/admin/user/settings) there is a checkbox that will allow users to select their own password on registration. The registration page then has two input boxes for Password and Confirm Password, however I would like to only have one input box for Password and no Confirm Password.
Many sites require only one entry of a password, ie Twitter and Facebook. This does increase the possibility of mistakes to be made when registering, but if the user makes a mistake in typing the password he/she can easily go to Request New Password and be sent a one-time login link.
Would anyone please be able to assist in creating a custom module to remove the Confirm Password input box?
Thank you very much!
Comments
With help from the drupal
With help from the drupal community, I have been set in the right direction.
Once I am able to get this to work I will post back with my solution.
Thanks!
Thanks to S13 and Raj for all
Thanks to S13 and Raj for all the help!
This is the code that worked in my case bc I was using LoginToboggan module (must go into a custom module)
This would be the code that would most likely work for you.
Things I learned:
1) the code must go into a custom module
2) the code will not work in template.php as in example below.
3) check out the $form array structure by typing the below at the top of the user-register.tpl.php file
or for a cleaner layout enable devel module and use this code
Regards
Must not be in a module
As you wrote, this code must be in a module, not in template.php
I'm doing the same, and writing the code in template.php, and it works for me.
Would you kindly share the
Would you kindly share the code used in template.php that allows the same functionality?
Thank you
<?phpfunction
this is my module file, but it is not working for me
Drupal 8 Version
Doesn't remove Password/Confirm Password
This code adds a new self-standing Password field to a registration form. It does not, however, remove the existing Password/Confirm Password widget. You end up with three fields (Password, Confirm password, and a second Password), and they conflict with one another, making registration impossible. How does one actually remove the legacy Password/Confirm widget? Thx.
EDIT UPDATE: Argh, nevermind. I'm working with two different D8 projects ... hint to anyone not having success ... if you're getting three fields, try '$form['account']['pass']' instead of '$form['pass']' or vice versa.
Not a support forum
This is a forum to request paid help. Please do not use it for discussions.
- gisle