Skip to content

create constants for field properties like displaytype, presence, uitype, etc.

It's a bad practice to have "magic numbers" in the code. It makes the code harder to read and maintain.

Here is an example from Vtiger_Field_Model:

image

See discussion: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-displaytype-in-fields-td23773.html