Hello everyone,
I noticed that modules can now add dictionaries by
setting $this->dictionnaries = array(); in the module descriptor (in 3.2
dev, maybe earlier but I wasn't aware).
This is a nice feature, however I can't figure out how to define the input
type for each field.
I see that this is hardcoded in dict.php in the fieldList method
for example, for country selection we have:
if ($fieldlist[$field] == 'pays') {
if (in_array('region_id',$fieldlist)) { print '<td> </td>';
continue; } // For region page, we do not show the country input
print '<td>';
$html->select_pays($obj->pays,'pays');
print '</td>';
}
It would be nice to be able to define our own fields' types as well
Maybe the use of hooks or triggers would be appropriate.
Let me know if i'm missing something. Otherwise, I have some code that I
wrote under dol v2.9 that I could share.
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev