Hello to you all!
First of all... i MUST say it: web-johnny... you are a genius! You have no idea how much I love this library!
That been said... I have 2 questions:
First: Is there a way (and how should I do it) to include more field types for the field_type function? If so... can that be done without changing the library file?
I also thought about creating another library file (like grocery_crud_extension) defining a function like extra_field_type (ideally with the same parameters as field_type) which would call some pre-defined callback_field depending on the field type you pass.
I would love some feed back about this idea, since I have been using GC for just a little while ('bout a month or so) and maybe there is a better way...
Second: It´s possible to add some extra data (html) to a default field? For ex.: You have a field named lastname... on the add/edit page, it has some automatic-attributes (id, etc.). Can you add some extra html attributes? Like a class for example...
I ask this because sometimes you may need to define different css styles for some fields in a form, but not others, or maybe running some js on just some of them.
Maybe there is something like the callback_field that let's you modify the default html instead of overwriting it? (like callback_after_insert but for a field... that would give you the default code...)
Thanks in advance!!
P.D.: If something sounds off... it's probably because my first language is not English, feel free to ask as many things and times as you need :P