33 Posts
justintime
6 years ago
1
Topic

I wish to include a field which contains an automatically generated number and which increments by 1 for each new form of this type created.

Get a Book for SEBLOD
4229 Posts
Kadministrator
6 years ago
1
Level 1

There is no such field, but you could add a normal text field with read-only variation, than increase it's value on each save using beforeStore code field.

4229 Posts
Kadministrator
6 years ago
0
Level 3

Than create some table with 2 columns - content_type_id and count. To content types add a text field and before mentioned beforeStore filed with code that first checks if this is a new item - if this is true, than read number from table you created, increase it by one and save this number back to table and to the text field you have on item. Just some basic logic.. 

Get a VIP membership