CustomFields module for Dolibarr
Downloads
=> CustomFields PRO EDITION V3
CustomFields Pro edition v3 is available for all versions of Dolibarr from 3.1 up to the latest (currently 3.3-alpha), you can buy it here:
Online demo:
http://customfields.org/demo/htdocs/index.php
CustomFields Pro contains all the features of CustomFields Free, but with many other more advanced features such as functions overloading. For a full comparison, you can consult the comparison chart here:
http://www.customfields.org/website/en/#comparison-chart
Note: Fields created with older versions of CustomFields and the Free version are fully compatible with the Pro version, you just need to delete all files CustomFields before copying the files from the Pro version (everything is explained in the file INSTALL.txt included in the archive, and also on the wiki). You will keep all your custom fields and data associated intact when upgrading.
=> CustomFields FREE EDITION V2
CustomFields Free edition is an open source version covered by the GPLv2 license and available for free (and always will be!). It works for all versions of Dolibarr from version 3.1 up to the latest.
= To download CustomFields Free edition for Dolibarr >= 3.3:
https://github.com/lrq3000/dolibarr_customfields/zipball/3.3
or
http://www.dolistore.com/other/221-Custom-Fields.html
= To download CustomFields Free edition for Dolibarr >= 3.2:
https://github.com/lrq3000/dolibarr_customfields/zipball/3.2
or
http://www.dolistore.com/other/98-Custom-Fields-for-Dolibarr-3-2.html
= To download CustomFields Free edition for Dolibarr 3.1.1:
https://github.com/lrq3000/dolibarr_customfields/zipball/3.1
or
http://www.dolistore.com/other/174-Custom-Fields-for-Dolibarr-3-1.html
Note: it is [b]strongly recommended to update your version of CustomFields if it is below 2.11[/ b] for the latest new features are critical.
Documentation
Documentation for the Free edition of the module can be found directly inside the archive files, in the file README-CF.txt
A full documentation of the Pro version of the module is available online on the wiki:
User documentation:
Developper documentation:
Example cases:
The rest of the post is old news and is kept here for history, you can just jump to the wiki and begin using the module.
Description
I here present you a module that my company created to be able to create and manage automatically/semi-automatically user-made custom fields. I here offer it freely and in opensource as a contribution back to the Dolibarr project.
My goal was to create a module that would semi-automate the creation of customfields, but fully automate the management of fields, even the ones that would be customized by the user (custom type, constraints or views or other complex sql), and that would be easy to integrate into the heterogenous nature of Dolibarr and into virtually any other module with little effort. I was not very satisfied with the currently similar implementation in the extraFields class, because it is not very generic (made for one module as of now and is very tedious to adapt to other modules). I wanted something more generic, easily adaptable to any module using a sql table to store its datas (a minimum of copy/paste to do), and to rely a maximum on SQL technology rather than php: I wanted my module to directly create a valid SQL structures, with real SQL fields, so that it can theoretically create and handle any SQL field type, even the one that were not thought by the devs. generic functions provided for programmers like fetchAny or fetchReferences.
The CustomFields module I present here can be fully adapted to almost any module in 4 to 7 steps (instructions provided in the Readme-CF.txt file).
You can find attached to this post the latest standalone release of the module (modCustomFields_v1-1-1). For the very latest release, you can find it merged into my Dolibarr github repository:
https://github.com/lrq3000/dolibarr
A few screenshots:
FEATURES:
- Natively support the modules: Invoices, Propales and Products/Services.
- Full multilanguage support (french and english for now, but you can easily translate to other languages using the same system as Dolibarr language files):
* multilanguage in the administration gui
* multilanguage user-defined custom fields labels
* AND multilanguage custom fields values (eg: yes/no select box can be translated to any language, same for enum user defined values). You can translate the values of your dropdown boxes!
- 6 natively supported fields types :
* Textbox
* Areabox
* YesNoBox
* TrueFalseBox
* DropdownBox (your own options)
* Constrained (link to other tables)
* Other (custom type)
The last one is not a native support but permits you to easily set any SQL data type that is not yet implemented, but it will be managed as best as possible by the module (by default if itās unknown it will be shown as a textbox).
It is easy too to add a native support for a new custom field type and manage the way it has to be printed on screen.
- Custom sql statements to create complex fields : these custom sql statements will be executed after the creation/edition of the custom field definition.
- Portable to any version of Dolibarr (in theory - as long as triggers are implemented)
- Seamlessly integrate into Dolibarr (seamlessly integrate into core functions and no change in the coding habits of Dolibarrās devs).
- Fully automated management of the customfields in the database and via triggers.
- Extensible to any module, be it core module or third-party user-made module (instructions provided in the README-CF.txt inside).
- Linked fields: Auto-detection and auto management of constraints (automatically find the primary key and choose the same data type and size) and auto management of their printing and edition (show them as a dropdown box).
You can even select the right field column to show to the user from the table.
Eg: if you want to link to the Dolibarrās users, select Constraint āllx_usersā. It will then show the rowid of the user. Now if you want to show the userās name instead of the rowid, just prefix āname_ā to your custom fieldās name (like āname_refā) and CustomFields will automatically fetch and show the userās names!
- Can define different custom fields PER module (you can have different custom fields for each module)
- Totally integrated into the generation of PDF and ODT (usable just as tags - you can even access linked records values of a constrained field, more inside the readme-technical).
- Elegant presentation in datasheet.
- Supports all classic functions of a standard field: creation, edition, cloning, etc.
- Clean: do not interfer with the normal functionning of Dolibarr, everything is separated. You can just delete the customfields and it will never do anything wrong with your Dolibarr install or your other datas.
- Develop your own modules via CustomFields: CF provides many methods to automatically manage the inputs of a user and access custom fields values from anywhere in the code (from Dolibarrās core to your own module!), and even a few generic functions to issue any SQL request and help to manage them.
- Code is very easy to edit/customize/reuse/port (fully commented and modular architecture, and no duplicates functionnalities).
- Free and open source: free to use, redistribute and edit to your needs!
- Use of strict SQL standards, so it should work for any database following the minimum standards requirement (tested on MySQL, probably works for PostGreSQL and SQLite).
More will come around the Dolibarr project with the final release like automatic attachment of external PDFs in PDF.
PiĆØces jointes :
- module_CustomFields_1-20120821.zip (151 KB)
- module_CustomFields_1.zip (151 KB)
- modCustomFields_v1_1_17b.zip (196 KB)
- dolibarr_321_toaddhooks.zip (110 KB)
- modCustomFields_v1_3_0_31b.zip (75.6 KB)
- modCustomFields_v1_2_8b.zip (80.6 KB)
- modCustomFields_v1_1_3.zip (152 KB)
- dolibarr_module_v0.zip (183 KB)
- dolibarr_module_v0_6_9.zip (183 KB)
- modCustomFields_v1.zip (146 KB)
- modCustomFields_v1_0.zip (146 KB)
- modCustomFields_v1_0_9.zip (148 KB)
- modCustomFields_v1_1_1.zip (152 KB)