[Vtigercrm-developers] Custom Fields

Martin Allen martin.allen at exe-squared.co.uk
Fri Jul 30 07:23:07 GMT 2021


If your creating a field using vtlib you can specify the table you want the field added to :

$field1 = new Vtiger_Field();
$field1->name = 'text';
$field1->label = 'Text';
$field1->table = $module->basetable;
$field1->column = 'text';
$field1->columntype = 'VARCHAR(255)';
$field1->uitype = 1;
$field1->typeofdata = 'V~O';
$field1->setSummaryField(1);
$block1->addField($field1);

This example adds it to the modules base table, but you can specify any table you want directly by name.

From: vtigercrm-developers-bounces at lists.vtigercrm.com <vtigercrm-developers-bounces at lists.vtigercrm.com> On Behalf Of B Correa
Sent: 29 July 2021 18:55
To: vtigercrm-developers at lists.vtigercrm.com
Subject: [Vtigercrm-developers] Custom Fields

Hi, custom fields can be added on module basetable ? Or only on custom table ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20210730/d17842e8/attachment.html>


More information about the vtigercrm-developers mailing list