The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
generate an ID every time a user submits a form - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: generate an ID every time a user submits a form (/showthread.php?tid=819) |
generate an ID every time a user submits a form - sumanguj - Aug 23rd, 2010 i'm gonna use this script for registration of an event. the user needs to complete the form and when he/she submits the form, a unique ID has to be generated and shown to him and the same be sent to his/her email provided. the form needs to be saved to a database for viewing later. is this possible using this script? RE: generate an ID every time a user submits a form - Aluwe - Aug 23rd, 2010 You have two options, either use the submission_id or use a rand in a field. RE: generate an ID every time a user submits a form - Ben - Aug 28th, 2010 Hi sumanguj, Yes, Aluwe is absolutely right. The unique submission_id is automatically generated for every submission, so that's definitely the simplest solution. If you don't like the fact that it starts at 1, and would like it to start at (say) 10,000, check out the Submission ID Manager module. That allows you to set the start number to whatever you want. If you need something fancier (e.g. alphanumeric numbers or something), you should check out the Submission Pre-Parser module. That lets you do what Aluwe suggested: create a random number, or something else for all incoming submissions. Good luck with the project! ![]() - Ben |