CMSB generating a default value for a field
2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 3, 2012 (RSS)
By zaba - August 2, 2012
Hi,
I want to create a field in cmsb with a random reference number which will automatically create a random 4 digit number in the field (reference number) when a new record is created in cmsb.
I have tried adding some php code to the default value but as I suspected it wont excecute the code. Is there any way that this is achievable without being too painful?
I want to create a field in cmsb with a random reference number which will automatically create a random 4 digit number in the field (reference number) when a new record is created in cmsb.
I have tried adding some php code to the default value but as I suspected it wont excecute the code. Is there any way that this is achievable without being too painful?
Re: [zaba] CMSB generating a default value for a field
By Jason - August 3, 2012
Hi,
What you would have to do is create a custom plugin that would enter this value into the CMS when a new record has been created. If you're comfortable with creating plugins, you'll probably want to use the record_postsave hook. If you'd like us to built this for you, please send an email to consulting@interactivetools.com and we'll go over some options.
Thanks,
What you would have to do is create a custom plugin that would enter this value into the CMS when a new record has been created. If you're comfortable with creating plugins, you'll probably want to use the record_postsave hook. If you'd like us to built this for you, please send an email to consulting@interactivetools.com and we'll go over some options.
Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/