Page 1 of 1

Additional button in user form Suggestion [done]

Posted: Fri Aug 25, 2023 1:34 am
by nc07
Dear Kevin,

I would like to make a suggestion to add a button in user form that generates random password and if it is a new user registration, the a email is sent to the new registered user with login details.

of course developers can achieve this but may on updates , it will disappear.

below function iam using at the moment where the length of password can be defined. It will be easy when creating a number of users and not have to think of any random password.

This just my though and suggestion towards improvement of NB.

Code: Select all

function GenerateRandomPassword(length) {
  var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+~|}{[]?><,./-=';
  var password = '';

  for (var i = 0; i < length; i++) {
    var randomIndex = Math.floor(Math.random() * characters.length);
    password += characters.charAt(randomIndex);
  }

  return password;
}


// Example usage:
//var randomPassword = generateRandomPassword(15);
console.log(randomPassword);
Regards
Nilesh

Re: Additional button in user form Suggestion

Posted: Mon Aug 28, 2023 6:32 am
by kev1n
Hi Nilesh,

Thanks for your suggestion/input. A Password Generator has been incorporated in the Users form.