Reputation: 11
Im trying to create a custom UIType and a followed this stack overflow without success, this is what i did:
Step1: update "modules\Vtiger\models\Field.php" and add new UIType as 222
I added the new UIType as follow in Field.php into public function getFieldDataType()
} else if($uiType == '222') {
$fieldDataType = 'json';
Step5: Register/insert new UIType in table vtiger_ws_fieldtype
But doesn't work
Upvotes: 1
Views: 649
Reputation: 1508
If you are trying to create new uitype just to store json then no need to create new uitype for it. You can create new text field to store json value in database
json_encode
to store json in newly created text fieldjson_decode
while fetching the value from db and use whenever needed.And if you still want to create new uitype then you can follow the description and steps given here
Upvotes: 1