Forums

ID Tickets

Evilok 28 Jan, 2009
Had a fair look through this forum but can't find anyway to assign an id ticket to forms. By this I mean when someone fills in a form the email forwarded from this has a unique number code. Any ideas appreciated! Rich
GreyHead 28 Jan, 2009
Hi Evilok,

ChronoForms creates a unique ID (or random enough that it shoudl be unique) when you save the data to the database. Otherwise it's possible to code your own id generator in the Form Html or one of the OnSubmit boxes depending what you want to do with it.

Bob
willson 28 Jan, 2009
Since I just posted my 1st question to the forum and got an answer I figured I'd contribute on the flip-side.

I had the same question and after much browsing through the forums came up with this:

1) on the Autogenerated Code tab of your form set Saving Data/Emails order: to "After Email"
2) on Setup Emails tab set Use Template Editor to `No´ in the Emails Properties section in the right column (allows you to put php code in the email template.
3) on the Form Code tab in the "On Submit code - after sending emai": section put the following code in where you want the unique id to show up

<?php
echo $row_jos_chronoforms_yourtablename->cf_id;
?>

4) put the same php code in the Emails Template tab where you want the number to appear.

It was that simple and gave me the cf_id of the datebase record to use as a unique identifier (confirmation number) for the user.

edited to clarify tablename
This topic is locked and no more replies can be posted.