[Vtigercrm-developers] Add upload file to Task

Sukhdev Mohan s.mohan at myti.it
Wed Feb 26 09:52:40 GMT 2020

Hi All,

I need to create an upload for Task module. I’ve used the following code to add the field with UI type 69

$module = Vtiger_Module::getInstance('Calendar');

$block = Vtiger_Block::getInstance('LBL_DESCRIPTION_INFORMATION', $module);

// Knowledge Base
$fieldInstance = new Vtiger_Field();
$fieldInstance->name = 'allegato';
$fieldInstance->table = 'vtiger_activity';
$fieldInstance->column = 'allegato';
$fieldInstance->label = 'LBL_ALLEGATO';
$fieldInstance->columntype = 'VARCHAR(150)';
$fieldInstance->uitype = 69;
$fieldInstance->typeofdata = 'V~O';
$fieldInstance->readonly = 1;

But I’m displaying an inout box instead of the input type file. How can I achieve it?

Best Regards,
Sukhdev Mohan
Cel. (+39) 320 7020345
Email s.mohan at myti.it

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20200226/8323e330/attachment.html>

More information about the vtigercrm-developers mailing list