A Labs post from Techjoomla means it time once again to change, redefine, innovate & solve another problem. Everyone at Techjoomla loves to innovate & put on their thinking hats to solve tricky problems.
So one such problem has been put forward to us by our subscribers for a while now. You guys have been asking us for introducing 'Custom fields' in many of our extensions. We have got requests for custom fields in JGive, JTicketing, Quick2Cart to name some of the popular extensions.
So in Typical Techjoomla fashion, we looked at solving this problem in a innovative way so that we can come up with a Solution that can not only help our extensions but also help the Joomla community & other developers in integrating fields in their extensions. This way we can share some of the code base across our extensions . Lesser code means less bugs & more time to work on new features !
Geek Questions ?
Aren't you effectively creating a system that can be used by extension developers to extend their own extensions to be a CCKs of sorts ? Why duplicate when we already have so many Awesome CCKs out there ? What happens when Joomla adopts the Unified Content Model ? (UCM) ?
Well when UCM makes it into the Joomla core, that will definitely the way to go.. But we are not sure when it will come as of now. So we have to solve our customers problems now. We love the concept of CCKs & provide tight integrations in several of our extensions to extend CCKs & use our functionality on top. However lot of our customers don't want to add a CCK simply to add a few fields. So if you want to use a CCK, those options will be there. If you don't want to use one, we still have a solution. There is demand .. So we are supplying while still providing flexibility where its needed
The Techjoomla Fields Manager
So today, we introduce to you the 'Techjoomla Fields Manager' com_tjfields. This extension will see the light of the day with the JTicketing 1.5 release ( if you have access you can check it out. An early prototype is already in the Alpha we released yesterday ! ).
The fields management system has been built on the native Joomla Category Manager concept. Which means that once its properly ready & stable other extensions can utilize it with more or less the same ease with which you can use the Joomla category manager for your own extensions. It'll take a while to get there.. but as we integrate it with our own extensions, we can test the generalization that's been built in & enhance it in iterations till its ready for general developer consumption in other extensions.
We have tried to keep the system pretty simple so that it solves the main problems users face for custom fields. For Advanced uses you can always use a CCK.
It will be released tested for the JTicketing integration with our stable release of JTicketing 1.5 by the end of this Month. Lets look at the various features it will eventually be packed with.
Multiple instances per extension
Each extension might need to use fields in various different ways & in various contexts. The field manager will support multiple contexts in which the field management system can be used. For instance in JTicketing, We use the field manager to offer 2 types of fields
- Universal Attendee fields : Fields all attendees need to fill out when buying event tickets
- Event Fields : Fields defined by the Admin to give more information about Events
Field Groups & ordering
You can create one or more field groups for each context & group fields into a group. This makes it easy to create tabs , slides or field sets when showing the field forms or details in your own component.
Multiple Field Types
We support an array of various field types & allow you to define validations & what not against each field.
Forms using the Field Manager will be rendered using native JForm thus making it future compatible & easy to extend.
This is just a Quick look at some of the features.. But we are looking forward to your comments & suggestions for the same ! Comment away !!