Buy Now
Sign in

How to add a 5 digit incremental number to a chronoforms 5 form

Chronorich , December 24 2017
C
Chronorich

Hello,

We are trying to add a 5 digit incremental number to a form we made in chronoforms 5.
The idea is that each one of our subscribers gets a form with a unique number starting with 30000, and further on 30001, 30002 etc.

Can this be done, and if so,how to do that?
We are new to Joomla and Chronoforms, so all help is highly appreciated!
Thanks in advance for your time and answer.
Best to all of you!

GreyHead

Hi Chronorich,

If they are registered on the site you can use the Joomla User ID (and add 30000) or you can save the form data to a table and use the Primary Key of the new record (and add 30000).

Personally I think that serial IDs can bea security risk as they are easy to guess and I prefer to use random strings instead.

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much

C
Chronorich

Hi Bob,

Thanks for your reply and the solutions you suggested.!

Chronrich

C
Chronorich

Hi Bob,

The solutions you suggested work very well. Happy to let you know that ! Thanks again!

To make this application work perfectly, there is one more problem that needs to be solved.
Can you help us out here also?

The form is visible as it should be, and the subscribers can add there information. But there is no number added in the field “application ID” (as we call it).
Normally the auto-increment number from the database should appear there.
What to do to make this number visible on the form, and printable as well?

Best greetings,
Chronorich

GreyHead

Hi Chronorich ,

The problem with showing this number in the data entry part of the form (I think that is what you are asking) is that it doesn't really exist at that point. You could create a database record 'on load' but then you will get empty records from users who view the form but don't complete it; you could get the number of the next empty record but then it is possible to get duplicate numbers if different users open the form around the same time.

The 'best' solution IMHO is to leave it off the data entry part of the form but to display it after the form is submitted and include it in any emails you then send.

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much