[Vtigercrm-developers] admin editable user field

lucia digirolamo l.digirolamo at websonica.net
Mon Feb 29 16:02:00 GMT 2016


Hi,

I'd like to have a custom field in users module which can only be 
editable by admins. Is that possible?

I read that I can create the new field with vtlib, what I don't know is 
the ui type I should use to have a field that only admins can edit:

$users = Vtiger_Module::getInstance('Users');
$block = Vtiger_Block::getInstance('LBL_MORE_INFORMATION', $users);

$field = new Vtiger_Field();
$field->name = 'mycustomfield';
$field->label = 'mycustomfield';
$field->table = 'vtiger_users';
$field->column = 'mycustomfield';
$field->columntype = ' ??? ';
$field->uitype = ???;
$field->typeofdata = '???~O';
$block->addField($field);

I search for the list of ui type but I couldn'f find any type that I can 
use, Is there a way to achieve this?

Thanks


More information about the vtigercrm-developers mailing list