The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Show unique ID to the user who just submitted the 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: Show unique ID to the user who just submitted the form (/showthread.php?tid=846)



Show unique ID to the user who just submitted the form - sumanguj - Sep 14th, 2010

i'm creating a contact form and is it possible to create a unique ID (say 123ABC) for every form submitted?

this unique ID (say 123ABC) should be shown or emailed to the user who has submitted the form and be visible in my admin page too.

could anyone kind enough help me with this? thank you.


RE: Show unique ID to the user who just submitted the form - sumanguj - Sep 15th, 2010

nobody?


RE: Show unique ID to the user who just submitted the form - Ben - Sep 15th, 2010

Hi Sumanguj,

Sure, no problem! You can do this with the Submission Pre-Parser module. See here:
http://modules.formtools.org/submission_pre_parser/

That module lets you run your own code when the submission is first submitted. What you would do in your case would be to populate a submission field with a random value, in whatever format you want. You could then use that value in the email template to email the user.

You might want to give this tutorial a look over. Even though it's about a different topic (displaying data on POST form redirect pages), it covers the same subject: how to create a custom "unique field" in the database and have it populated with a random value:
http://docs.formtools.org/tutorials/post_forms_redirect_data/

Hope this helps, and good luck! Smile

- Ben


RE: Show unique ID to the user who just submitted the form - sumanguj - Sep 17th, 2010

its so complicated.

wish there's an example which has already been done. can't find it though Sad


RE: Show unique ID to the user who just submitted the form - Ben - Sep 19th, 2010

Sorry, Sumanguy Sad

A far simpler solution would be to just use the unique submission ID that Form Tools automatically assigns to each submission after it's created - but it will always just be an integer, nothing more.

I think these are the only ways to really do it. Sorry I couldn't be any more help!

- Ben


RE: Show unique ID to the user who just submitted the form - sumanguj - Sep 21st, 2010

btw, is it possible to show that ID (even if it is only integer) in the auto-respond email or in the thank you page?

if i can start the ID from say 50001, that is. any thoughts?


RE: Show unique ID to the user who just submitted the form - Ben - Sep 25th, 2010

Hi Sumanguj,

Apologies for the wait!

Quote:btw, is it possible to show that ID (even if it is only integer) in the auto-respond email or in the thank you page?

Absolutely! If you're using a standard POST request for your form (i.e. just posting the data to the Form Tools process.php script), you can just go into the Form Tools interface and specify that field to be passed along to the thank you page. If you're using the API, you'll have all the info already returned by the ft_api_init_form_page() function - including the submission ID.

Let me know if you need further help on either of these.

Quote:if i can start the ID from say 50001, that is. any thoughts?

Sure, no problem! Just download this module: http://modules.formtools.org/submission_id_manager/

That let's you customize the next submission ID for your form, so you can set it up to start at 50,000.

Hope this helps!

- Ben


RE: Show unique ID to the user who just submitted the form - sumanguj - Sep 1st, 2011

Someone else in my team made something else and i completely forgot about this.

Thank You. I'm in need of this very thing again and i'll look into it further.

P.S: I've been using your formtool for all my school related works. Thank You once again for such an amazing script.