Automatic Number Increments

dwaine18

New Member
Hello,

I am building a registration form where I would like to assign each new user a identifier number that is different from the joomla ID number. This number will be at least 8 digits in length, will increment by +1 with each new registration and will automatically be shown on the registration form. How do I put this in place so this is automatically assigned to each new user.

Thanks,
Dwayne
 
I used the calc element with this php code:

return $unique_key = substr(md5(rand(0, 1000000)), 0, 7);

However, I also have a verification element in the form and this causes the generated number to continuously change everytime the form is refreshed, reloaded of confirmed.
 
If you want to set a default in new records you should use a field element (not a calc), check "eval" and put your code in "Default".
Set element access (add/edit) to nobody so this value can't be changed.

Is this the number you want to send to your user who should complete the registration (your other thread)?
 
This worked perfectly and yes this is the number that I want to send to the user once they complete the registration process.
 
Back
Top