How to know the data types of the fields of the different modules?

Is there any place where the datatype values are stored? I need to know what kind of data they are in order to display them.
For example if the status field is a dropdown I will put a dropdown, if it is a text area I will put a text area etc.

Parents Reply Children
  • No, the API is for v7.x and higher so it will not work in 6.5

    But 6.5.x still has metadata for each of the modules, and that metadata describes your fields, including "name" and "type".

    It's been a while since I worked in 6.x but each module should have vardefs in its directory:


    and custom fields will be in:


    To get a list of fields for a given module programmatically, this should work in 6.x

            $bean = BeanFactory::getBean($module_name);
            $field_defs[$module_name] = $bean->getFieldDefinitions();


    Each of those definitions should include the field "name" and "type".

    Let me know if this helps.