Add Module Extrafields

ID - _BUGFISH - E#192
^Top
<< Back
Mobile-Menu










Add Module Extrafields
Category: Dolibarr
Sub-Category:
Creator: Jan-Maurice Dahlmanns
Created: 2023-01-10 08:47:25
Modified: 2024-11-21 17:15:24
Views: 78

Caution: I do not guarantee the reliability of the information given here, the code described on this page is executed at your own risk and in the event of damage or other unforeseeable consequences I am in no way responsible or liable.

addExtraField ( $attrname,$label, $type, $pos,$size,$elementtype,$unique = 0,$required = 0,$default_value = '',
$param = '',$alwayseditable = 0,$perms = '',$list = '-1',$help = '',$computed = '',$entity = '',$langfile = '',$enabled = '1',$totalizable = 0,$printable = 0)


Add a new extra field parameter.
string $attrname Code of attribute
string $label label of attribute
string $type Type of attribute
('boolean','int','varchar','text','html','date','datehour','price','phone','mail','password','url','select','checkbox','separate',...)
int $pos Position of attribute
string $size Size/length definition of attribute ('5', '24,8', ...). For float, it contains 2 numeric separated with a comma.
string $elementtype Element type. Same value than object->table_element (Example 'member', 'product', 'thirdparty', ...)
int $unique Is field unique or not
int $required Is field required or not
string $default_value Defaulted value (In database. use the default_value feature for default value on screen. Example: '', '0', 'null',
'avalue')
array | string $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
int $alwayseditable Is attribute always editable regardless of the document status
string $perms Permission to check
string $list Visibilty ('0'=never visible, '1'=visible on list+forms, '2'=list only, '3'=form only or 'eval string')
string $help Text with help tooltip
string $computed Computed value
string $entity Entity of extrafields (for multicompany modules)
string $langfile Language file
string $enabled Condition to have the field enabled or not
int $totalizable Is a measure. Must show a total on lists
int $printable Is extrafield displayed on PDF


Returns
int <=0 if KO, >0 if OK 

Currently 0 Upvotes!

captcha image
System - 2024-11-04 23:35:58
Commenting System Initialized! Have a very nice day!

Switches: 1 | Arrivals: 8 | Visits: 9
This Website is using Session Cookies for Site Functionality.