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!
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
Hi Bob,
Thanks for your reply and the solutions you suggested.!
Chronrich
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
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