Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hey, wondering if the length of the serial field can be specified? I require a 5-digit serial for one content type, and a 7-digit serial for another. Thoughts?
Comments
Comment #1
emcniece CreditAttribution: emcniece commentedI suppose this could be initialized as a starting number... for example, the 5-digit number could be started at 10000, and the 7-digit number could start at 1000000. Any way to adjust the starting number of the serial?
Comment #2
emcniece CreditAttribution: emcniece commentedYep, found the other thread(s).
Comment #3
FaBMak CreditAttribution: FaBMak commentedI'm looking for something like this, but i'm case i need the change the format of the Serial. Instead of 1, should be 0001.
Is this possible?
Comment #4
aalireza CreditAttribution: aalireza commentedi want something like this , how can do this ?
Comment #5
zwerg CreditAttribution: zwerg commentedIt's not a duplicate because this applies to v7.x, not to the 6.x version of serial field.
Is it possible to change the serial length through the UI like the patch in v6?
Comment #6
zwerg CreditAttribution: zwerg commentedComment #7
zwerg CreditAttribution: zwerg commentedFound a solution using computed_field in https://www.drupal.org/node/2055161.
If you want to set up a starting number like 1000000, you need to add this via "+" in the computed code, e.g.: