Forums

Show form id in email

HerMister 31 Mar, 2013
Hi i need a problem. I have made and set up all things i need (i hope :-)), but there is one think i dont know how to make it. I have a form (store db and email). I also set up email template (name,email,phone,...) but i need also a form id (for example:
cf_id 1
cf_uid 07ff96178e2f2d2f55ea59de933921da)
I dont care which of them i see in email template (better will be cf_id)

I try to take a {cf_id} into template like {input_text_1}, but thats works done.

Do anybody know how i take a form id into email template?

Thanks
GreyHead 01 Apr, 2013
Hi HerMister,

If the Email is after the DB Save then you can get the values of either variable (add a Debugger action temporarily to see where they are in the $form->data array).

Personally I'd use my Unique ID [GH] action to do this, it will give you a guaranteed random unique value.

Please see this FAQ for more.

Bob
HerMister 01 Apr, 2013
HI,
thanks for answer, what i read, this is i need, so thanks fot that. But do you have some tutorial, how to keep this to db? And off course how to show it in text (email or thanks answer)
GreyHead 01 Apr, 2013
Hi HerMister,

Here's the Help tab from my action:

Unique ID [GH] action

This action generates a unique random ID for a record to be saved into a database table. The ID is usually a short-alphanumeric string like XY9856G that can easily be written down if needed. When it generates the ID the action checks the database table to ensure that it is not already in use.

A key advantage of random string IDs is that unlike serial numbers they are very difficult to predict and so provide an additional level of security to your records.
Settings

* The Table entry is required. Select the database table where the record will be saved.

* The Table column entry is required. Enter the name of the column where the Unique id will be saved e.g. unique_id or text_input_99.

* The Form input entry is the name of the form input where the Unique ID should be added, it defaults to the same as the Table column entry.

* The Ident pattern entry is the template for the Unique ID string. Use A and or 9 to indicate alpha or numeric characters. The default value is AA9999A which will create IDs like FP8467G or UU1286L. Using, for example 999 would create IDs like 108 or 540. You can optionally add a fixed value prefix and / or suffix in square brackets e.g. [TT]999AA[K] which will create IDs like TT138UIK or TT942EEK.


If you set the Table column to say 'unique_id' then you can use {unique_id} in your email template to display the value.

Bob
HerMister 01 Apr, 2013
i do it at my test form and rocord look like this:
Field title Field value
cf_id 1
cf_uid 44b8fd9846a29809455cc9de4fd5e6ce
cf_created 2013-04-01 14:47:23
cf_modified 0000-00-00 00:00:00
cf_created_by 0
cf_modified_by 0
cf_ipaddress 46.13.253.57
cf_user_id 0
input_text_1 qqq
input_text_2 www
input_submit_3 Submit
unique_id

there isnt any number or text at unique_id

at table is varchar lenght 255...i have it install already, there is some set up how to automatically generate a code when submit button is clicked or something
GreyHead 01 Apr, 2013
Hi HerMister,

Have you installed the Unique ID action and added it to your On Submit event?

Bob
HerMister 01 Apr, 2013
yes i have installed it but i dont know where is that events you write about in last post...I find it before something like this in configue on submit button, but there isnt like that

EDIT:: i am stupid i found it...now i am going to try it...yes it is work perfectly...thanks
This topic is locked and no more replies can be posted.