Hi,
Looking for help to create a hidden field that acts as a numbering system for registrations submitted. Eg consecutive numbering system
Is the the easiest way to track each registration in order of submission or should I be looking to just create a hidden date/time stamp?
Any advice is much appreciated
Hi urbanone,
If you are saving the records in a database then you can use an autoincremented record id as a serial number. You can pick up the last record id in the OnSubmit After box.
Personally I prefer to use randomly generated strings as ids if they are going to be used inside a web application. Serial numbers make it too easy to guess what other urls might be valid.
Bob
Thanks - I only need a temporary method of looking at the order that registrations are submitted - other than that the number will not be used for any other purpose.
So I assume I have to add a script to the code after the OnSubmit box so that the database will assign each registration a consecutive number?
Hi urbanone,
Most (but not all) MySQL tables have some form of autoincremented column -- often called 'id'. If you are using a table created in ChronoForms it will almost certainly be 'cf_id'
Bob
Hi urbanone,
Yes . . . but cf_id is set that way already so you don't need to do anything.
Bob
Ok thanks very much - have sorted it all out and everything is running smoothly! Cheers