I need to be able to identify each form submitted with a reference and unique number for quality assurance purposes. Is there any way in which you can have a reference and a new number added to the form when it is generated ?. The reference is useful for using multiple forms for different purposes, ie for a sales lead we could have a ref as sales0001 etc. Is this possible at all or outside the scope of ChronoForms.
Hi Jeff,
each new form record saved gets a unique uid record in the records page, if you want it per form then add a hidden field at every form with a unique value per forms!
Cheers
Max
each new form record saved gets a unique uid record in the records page, if you want it per form then add a hidden field at every form with a unique value per forms!
Cheers
Max
Hi,
THanks for that, what I actually need is to generate a unique reference (different to the uid) that can be customised and linked to the used id. I am looking at something like 87/sales001
The 87 is the joomla registered user id
sales 001 is the database table reference incremented every time this user adds a new form.
This number should be added to the email as his/her form reference.
In this way every sales person adding a new sales form can be identified as such. I hope this is clearer.
Jeff2
THanks for that, what I actually need is to generate a unique reference (different to the uid) that can be customised and linked to the used id. I am looking at something like 87/sales001
The 87 is the joomla registered user id
sales 001 is the database table reference incremented every time this user adds a new form.
This number should be added to the email as his/her form reference.
In this way every sales person adding a new sales form can be identified as such. I hope this is clearer.
Jeff2
Hi jeff2,
Change the order so that the Autogenrated Code (when the data is saved) runs before the email. Then you can pick up the record id and use that to build the unique id to show in the email.
The info saved to the table is kept in a variable called $MyForm->tablerow["jos_table_name"]
Bob
Change the order so that the Autogenrated Code (when the data is saved) runs before the email. Then you can pick up the record id and use that to build the unique id to show in the email.
The info saved to the table is kept in a variable called $MyForm->tablerow["jos_table_name"]
Bob
Hi Jeff,
if your for is used for registration or is submitted bya logged in user then the variable:
Cheers
Max
if your for is used for registration or is submitted bya logged in user then the variable:
$MyForm->tablerow["jos_table_name"]->cf_user_id
will hold the user id which you can use in your email template!Cheers
Max
Thank you,
I am using the form for a salesteam to upload there weekly customer contacts.
I have the user id for which identifies the form added by and i can know look at a way of generating a random number for my uploaded form reference (the uid is too long and meaningless to internal personnel).
As these forms are for registered users only.
It must be possible to prepopulate the form with the
user name
user email
date form created
I am not a programmer but a willing learner.
Is there any tutorials that show how to add these fields into the form.
Jeff2
I am using the form for a salesteam to upload there weekly customer contacts.
I have the user id for which identifies the form added by and i can know look at a way of generating a random number for my uploaded form reference (the uid is too long and meaningless to internal personnel).
As these forms are for registered users only.
It must be possible to prepopulate the form with the
user name
user email
date form created
I am not a programmer but a willing learner.
Is there any tutorials that show how to add these fields into the form.
Jeff2
Hi jeff2,
There is some code in this thread that generates a random string then checks that it hasn't already been used. You can choose the format for your string - I tend to use AA9999A e.g. RS8651T or AA999A e.g. YG938P as these seem to be fairly friendly
Bob
There is some code in this thread that generates a random string then checks that it hasn't already been used. You can choose the format for your string - I tend to use AA9999A e.g. RS8651T or AA999A e.g. YG938P as these seem to be fairly friendly
Bob
Thanks Bob,
It worked just as described and solves my initial problem (adding the user id with the generated number is exactly what I was looking for).
I must say this component is absolutely great, I will check out the connectivity for my forms next.
Great job.
One final request, is there a way of prepopulating the form with user name and user email from my joomla registered list.
Jeff2
It worked just as described and solves my initial problem (adding the user id with the generated number is exactly what I was looking for).
I must say this component is absolutely great, I will check out the connectivity for my forms next.
Great job.
One final request, is there a way of prepopulating the form with user name and user email from my joomla registered list.
Jeff2
Hi Jeff2,
Yes you can use the Joomla User object - the code is described here many times [forumsb]getUser[/forumsb]
Bob
Yes you can use the Joomla User object - the code is described here many times [forumsb]getUser[/forumsb]
Bob
hi,
which "value" the id of a table, the name of an existing field ???
please give more pratical examples.
"each new form record saved gets a unique uid record in the records page, if you want it per form then add a hidden field at every form with a unique value per forms!"
which "value" the id of a table, the name of an existing field ???
please give more pratical examples.
This topic is locked and no more replies can be posted.