This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 4
Unique Identifier
Started 9 years ago by marcusmccown | 4 posts |
-
Is there a way to assign a unique number or alphanumeric number ether a customer number on a signup form or an order number?
Posted 9 years ago # -
I would like to know if this is possible also.
Posted 9 years ago # -
I'm interested in this too.
I've wrote my idea (Autoincrement field) for future v.4.7 here : http://www.appnitro.com/forums/topic/47-features-list?replies=5
IMHO, currently, having a customized unique field can't be done (btw as unique we can use the id# but can't be customized)
I hope someone of Appnitro team (Yuniar?) can give a us a suggestion how to do this.Posted 9 years ago # -
Hello,
Here is what I've done to do this but I'm sure this will be added in the next versionIn post-functions.php, I've added :
// Random String
function generateRandomString6($length = 6) {
return substr(str_shuffle("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
}// Random ID - NetID
$NetID = generateRandomString6();
$_SESSION['NetID'] = $NetID;// Insert field in the DataBase (where element_16 is the Random Field)
if($form_id == 1234){ $table_data['element_16'] = $NetID; }Olivier
Lille (FRANCE)Posted 9 years ago #
Reply
You must log in to post.