Edds
Edds

Reputation: 11

Custom Field in Vtiger 7

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

enter image description here

But doesn't work

Upvotes: 1

Views: 649

Answers (1)

Sachin I
Sachin I

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

  • use json_encode to store json in newly created text field
  • use json_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

Related Questions