# Custom Fields (/docs/netbox/v4.3/models/extras/customfield)



NetBox administrators can extend NetBox's built-in data model by adding custom fields to most object types. See the [custom fields documentation](/netbox/v4.3/customization/custom-fields/) for more information.

## Fields [#fields]

### Model(s) [#models]

Select the NetBox object type or types to which this custom field applies.

### Name [#name]

The raw field name. This will be used in the database and API, and should consist only of alphanumeric characters and underscores. (Use the `label` field to designate a human-friendly name for the custom field.)

### Label [#label]

An optional human-friendly name for the custom field. If not defined, the field's `name` attribute will be used.

### Group Name [#group-name]

If this custom field should be grouped with others, specify the name of the group here. Custom fields with no group defined will be ordered only by weight and name.

### Type [#type]

The type of data this field holds. This must be one of the following:

| Type               | Description                                                        |
| ------------------ | ------------------------------------------------------------------ |
| Text               | Free-form text (intended for single-line use)                      |
| Long text          | Free-form of any length; supports Markdown rendering               |
| Integer            | A whole number (positive or negative)                              |
| Boolean            | True or false                                                      |
| Date               | A date in ISO 8601 format (YYYY-MM-DD)                             |
| URL                | This will be presented as a link in the web UI                     |
| JSON               | Arbitrary data stored in JSON format                               |
| Selection          | A selection of one of several pre-defined custom choices           |
| Multiple selection | A selection field which supports the assignment of multiple values |
| Object             | A single NetBox object of the type defined by `object_type`        |
| Multiple object    | One or more NetBox objects of the type defined by `object_type`    |

### Related Object Type [#related-object-type]

For object and multiple-object fields only. Designates the type of NetBox object being referenced.

### Related Object Filter [#related-object-filter]

For object and multi-object custom fields, a filter may be defined to limit the available objects when populating a field value. This filter maps object attributes to values. For example, `{"status": "active"}` will include only objects with a status of "active."

<Callout type="warn">
  This setting is employed for convenience only, and should not be relied upon to enforce data integrity.
</Callout>

### Weight [#weight]

A numeric weight used to override alphabetic ordering of fields by name. Custom fields with a lower weight will be listed before those with a higher weight. (Note that weight applies within the context of a custom field group, if defined.)

### Required [#required]

If enabled, this custom field must be populated with a valid value for the object to pass validation.

### Unique [#unique]

If enabled, each object must have a unique value set for this custom field (per object type).

### Description [#description]

A brief description of the field's purpose (optional).

### Filter Logic [#filter-logic]

Defines how filters are evaluated against custom field values.

| Option   | Description                         |
| -------- | ----------------------------------- |
| Disabled | Filtering disabled                  |
| Loose    | Match any occurrence of the value   |
| Exact    | Match only the complete field value |

### UI Visible [#ui-visible]

Controls whether the custom field is displayed for objects within the NetBox user interface.

| Option | Description                                                    |
| ------ | -------------------------------------------------------------- |
| Always | The field is always displayed when viewing an object (default) |
| If set | The field is displayed only if a value has been defined        |
| Hidden | The field is not displayed when viewing an object              |

### UI Editable [#ui-editable]

Controls whether the custom field is editable on objects within the NetBox user interface.

| Option | Description                                                                  |
| ------ | ---------------------------------------------------------------------------- |
| Yes    | The field's value may be changed when editing an object (default)            |
| No     | The field's value is displayed when editing an object but may not be altered |
| Hidden | The field is not displayed when editing an object                            |

### Default [#default]

The default value to populate for the custom field when creating new objects (optional). This value must be expressed as JSON. If this is a choice or multi-choice field, this must be one of the available choices.

### Choice Set [#choice-set]

For selection and multi-select custom fields only, this is the [set of choices](/netbox/v4.3/models/extras/customfieldchoiceset/) which are valid for the field.

### Cloneable [#cloneable]

If enabled, values from this field will be automatically pre-populated when cloning existing objects.

### Minimum Value [#minimum-value]

For numeric custom fields only. The minimum valid value (optional).

### Maximum Value [#maximum-value]

For numeric custom fields only. The maximum valid value (optional).

### Validation Regex [#validation-regex]

For string-based custom fields only. A regular expression used to validate the field's value (optional).
