Views: 2438
Last Modified: 14.10.2021

When system doesn't have a field for necessary data

A custom field is a system feature you can use to add your own fields to system objects.

You need to differentiate Custom fields in the system modules and iblock properties.

Custom fields are:

  • more universal in contrast to iblock properties, because they can be specified for various system objects
  • limited in features, because they have a small number of object types and data.

Custom fields can be created in an unlimited number for each object. When selecting a specific custom fields, additional settings become available for corresponding type.

When creating a custom field, you must indicate module-specific objects in the system:

Built-in custom field objects
Module Object Description
Kernel (main module) USER for user
Blogs BLOG_BLOG for blog
BLOG_POSTfor blog post
BLOG_COMMENTfor message comment
Tasks TASKS_TASK for tasks
Information blocksIBLOCK_N_SECTION for iblock sections with ID = N
IBLOCK_N for iblock with ID = N
Calendar CALENDAR_EVENT for calendar events
e-Learning LEARN_ATTEMPT for test attempts
Social Network SONET_GROUP for social network groups
Document library WEBDAV for document libraries
Forum FORUM_MESSAGE for forum messages
Highload-iblocks HLBLOCK_N for highload-block with ID=N

Not all modules offer default objects for custom fields. Developer can create their own objects as required.

Note: All modules that utilize information blocks can access custom field objects of the Information blocks module.


Courses developed by Bitrix24