Can I have them enum field type start from 1 instead of 0?
enum field type start from 1.
- Single Page
Posted 25 April 2013 - 14:59 PM
Posted 02 May 2013 - 01:20 AM
Well my question applies specifically to grocery crud.
I origionally had a table column for the day of the week being ant integer 1-7.
If I change field_type to enum in grocery crud then the days start at 0 which means I have to change alot of code elsewhere.
I'm guessing I would need to used a callback to add 1 to the selection??
Posted 02 May 2013 - 07:10 AM
Well GC is PHP based so the limitations of PHP come along to GC as well.
Now in terms of having to change a lot of code... I am not sure what exactly you have implemented but this shouldn't be an issue if you follow the MVC approach.
The reason I am saying this is because you mentioned that you were having a table holding the days of the week.
Why don't you change just the model? Controller and view shouldn't be affected from this.