Add custom field to Users module
I want add fields in module user.
What should I do and how.
can anyone help me with this problem.
Thank you very much!!!
What should I do and how.
can anyone help me with this problem.
Thank you very much!!!
Comments
You may use the following -
$moduleName="Users";
$moduleInstance = Vtiger_Module::getInstance($moduleName);
$blockInstance = Vtiger_Block::getInstance('LBL_USER_IMAGE_INFORMATION',$moduleInstance);
$field = new Vtiger_Field();
$field->name = "CUSTOM_FIELD_NAME";
$field->label = "CUSTOM_FIELD_LABEL";
$field->column ="CUSTOM_FIELD_NAME";
$field->table = "vtiger_users";
$field->uitype = '1';
$field->typeofdata = 'V~O';
$field->readonly = '0';
$field->displaytype = '1';
$field->masseditable = '0';
$blockInstance->addField($field);
echo "Done";
NB- Please take a backup of Database before you do the above
Thanks
Vivek
Thank you very much.
I will follow your instructions.
This forum is great for me