Object type dependency for Custom Fields #8242

Closed
opened 2025-12-29 20:34:16 +01:00 by adam · 1 comment
Owner

Originally created by @misch42 on GitHub (Jun 26, 2023).

NetBox version

3.5.4

Feature type

Change to existing functionality

Proposed functionality

Wouldn't it be great to have Custom Fields that are only displayed for a model of a specific model type?

Use case

The definition of a custom field includes the Content Type for which this custom field is valid. i.e. a custom field "disk" only for DCIM->device. Especially when desiging my own circuit types, some additional custom fields are needed. i.e. I am modelling my IPSEC VPNs as circuits. But this needs a bunch of new fields like IKE Params, ESP params, Authentication, Identification, and more.

These new fields appear in all cirtuits independent of its type. So also in standard provider circuits there new fields appear.

It would help a lot defining a custom field for a Content Typ circiut only if the the circuit type is IPsec VPN.

Or: an additional field disk for a device only of the device role is "Mail Server".

Perhaps this could be realized with conditionals in the field definition.

Database changes

don't know

External dependencies

no.

Originally created by @misch42 on GitHub (Jun 26, 2023). ### NetBox version 3.5.4 ### Feature type Change to existing functionality ### Proposed functionality Wouldn't it be great to have Custom Fields that are only displayed for a model of a specific model type? ### Use case The definition of a custom field includes the Content Type for which this custom field is valid. i.e. a custom field "disk" only for DCIM->device. Especially when desiging my own circuit types, some additional custom fields are needed. i.e. I am modelling my IPSEC VPNs as circuits. But this needs a bunch of new fields like IKE Params, ESP params, Authentication, Identification, and more. These new fields appear in all cirtuits independent of its type. So also in standard provider circuits there new fields appear. It would help a lot defining a custom field for a Content Typ circiut only if the the circuit type is IPsec VPN. Or: an additional field disk for a device only of the device role is "Mail Server". Perhaps this could be realized with conditionals in the field definition. ### Database changes don't know ### External dependencies no.
adam added the status: duplicate label 2025-12-29 20:34:16 +01:00
adam closed this issue 2025-12-29 20:34:16 +01:00
Author
Owner

@abhi1693 commented on GitHub (Jun 26, 2023):

Thank you for submitting this issue, however it appears that this topic has already been raised. Please see issue #12423 for further discussion.

@abhi1693 commented on GitHub (Jun 26, 2023): Thank you for submitting this issue, however it appears that this topic has already been raised. Please see issue #12423 for further discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8242