georgie
Member
Hello
I want to generate a random string of 14 characters automatically during a form submission.
OK, I do this with success, in a Default value (Eval) on a simple field:
But I want to be sure of the uniqueness of my string. So I can not just use isunique plugin, because I would do this automaticallyand hidden.
Is it possible in Eval?
Thank you
Georges
I want to generate a random string of 14 characters automatically during a form submission.
OK, I do this with success, in a Default value (Eval) on a simple field:
Code:
return substr(str_shuffle(str_repeat('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', mt_rand(1,14))),1,14);
But I want to be sure of the uniqueness of my string. So I can not just use isunique plugin, because I would do this automaticallyand hidden.
Is it possible in Eval?
Thank you
Georges