The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
How to set UniqueID - 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: How to set UniqueID (/showthread.php?tid=227) |
How to set UniqueID - simplon - Jul 29th, 2009 Hi! I am new to Form Tools and actually forms too. I am trying to create a form which needs to have an uniqueID so I can use it for the users to refer to the entry they submitted. Will I be able to use the SubmissionID and show the user the ID on the Thank You page? Or I need to set it beforehand? How should I go about it? Sorry I am quite new to this. Thanks in advance! simplon RE: How to set UniqueID - Ben - Aug 2nd, 2009 Hey Simplon, Welcome to the forums! Sure, you can certainly do this. The easiest way is with "direct" form submissions - posting you form to process.php. When you use that method, all you need to do is go to your Forms -> Fields tab and check the "Pass On" column for the Submission ID row. That will then pass along the new (unique) submission ID to your "thank you" page via the query string. You can access it in PHP like so: PHP Code: <?=$_GET["submission_id"]?> If you're using the API, I *believe* it's that value is stored in the form_tools_submission_id key, which you can display like so: PHP Code: $fields["form_tools_submission_id"]; However, $fields has to be the variable name that stores the return value from the ft_api_init_form_page() function. More info about the API can be found in the documentation and in some of the tutorials. Let me know if you have any questions, or need any more pointers! - Ben |