Forums

Consecutive Numbering Field for Registrations

urbanone 28 Apr, 2010
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
GreyHead 28 Apr, 2010
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
urbanone 28 Apr, 2010
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?
GreyHead 28 Apr, 2010
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
urbanone 28 Apr, 2010

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




Yep read the tutorial and have sorted that out but the new layout when creating CF tables is a little confusing - I assume if I want to assign cf_id to auto increment and to be the primary key that these buttons/icons should be 'highlighted' which will tell me that they are 'on'
GreyHead 28 Apr, 2010
Hi urbanone,

Yes . . . but cf_id is set that way already so you don't need to do anything.

Bob
urbanone 28 Apr, 2010
Ok thanks very much - have sorted it all out and everything is running smoothly! Cheers
This topic is locked and no more replies can be posted.