September 20, 2019

How to change field length of vtiger custom fields?

Let’s assume you have created a text field with a limited length. Now you detect that you require a change on what custom field. But as of vtiger 7.4 / end of 2022 it is not possible to modify the field length via vtiger UI/frontend.

Identify the custom field name of quotes

To identify the custom field in vtiger read this article How to find custom field name in vtiger?

Usually the custom fields are named with prefix cf_ and a number like:
cf_1234

Change custom field length

Fetch the configured custom field length via database.

SHOW COLUMNS FROM vtiger_quotescf WHERE FIELD = 'cf_1234'

and now you will get a result like

Field
TypeNullKeyDefaultExtra
cf_1234varchar(20)YES
SQL result of the column

Here you can see that custom field has a length of varchar(20).

In this case you can now modify the length of the column by changing the type from varchar(20) to varchar(100).

Leave a Comment

Your email address will not be published. Required fields are marked *