Hello Paul,
About the bugs:
1. It's not possible to specify a size for Areabox types because they rely on the SQL text() type, which itself can't specify a size because it's a variable-sized type, which mean that you don't have to care about the size of your input, SQL will automatically manage it. On the other hand, Textbox type (which rely on varchar2()) can be sized as you like, but it won't be resized automatically (so you will always have a fixed maximum input for this type, this is why I chose to implement text() for Areabox).
2. Yes indeed I witnessed this problem and it's kinda hard to fix it consistently for all clients' installs, but I thought I had fixed it in the last version I've sent you. I will take a closer look to fix it and send you a patch.
3. Thank you for this detailed feedback (with the image you sent me by mail), I will fix this bug and send you a patch.
However, I am currently working on another project and thus won't be able to code those fixes this week, but I will send you the patches by the middle of the next week (~mid May).
----
About the overloading functions, yes there are people who are regularly using it but mainly reports their experiences on the french board.
You can find a good example that I didn't yet post on the wiki:
http://www.dolibarr.fr/forum/511-creation-dun-nouveau-module/28793-release-customfields-module-champs-personnalises?limit=15&start=435#38603
About your bug, I can't see a problem with your code. Did you try to print the SQL query to check that $object->id returns what you expect, and that the generated SQL query is working? (try with a simple print($sql);die(); ).
PS: you should also use $object->$idvar instead of $object->id, sometimes the field containing the object's id is not called id in Dolibarr, but CustomFields provides you the field name in $idvar.
↧