You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow markdown/hyperlink rendering for custom field choice sets.
I'm marking this as 'data model extension' because I imagine some tweaks to the validation will need to happen before saving the values into the database.
When creating a custom field choice set you input the value as choice1:First Choice
It would be a great feature to be able to have markdown supported in the "First Choice" side of the input such that we can turn these values into hyperlinks.
Adding this ability would allow custom field choice sets to be turned into URL's.
Imagine a scenario where you have a custom field called "Business Units"
You create a custom field choice set that contains all your business unit choices:
What we would very likely do is craft the URL hyperlink to be a search filter for the value of that custom field so clicking on it from the objects perspective will then take you to a search query for all objects containing that value.
Similar to how you could click on a tag and it would give you all objects with that tag, same concept.
Database changes
Likely some changes here to accept markdown/hyperlinks to be stored in the value of the tablet. Don't know for sure.
External dependencies
None that I can think of.
The text was updated successfully, but these errors were encountered:
goteamkor
changed the title
Allow hyperlinking/markdown in custom field choice sets
Allow hyperlinking/markdown support in custom field choice sets
Sep 6, 2024
Unfortunately this would be infeasible to implement given the constraints around how custom field choices are implemented: All choices need to be renderable as simple value & label pairings. This might be something to reconsider if we opt to rearchitect custom field choices in the future.
NetBox version
v.4.1.0
Feature type
Data model extension
Proposed functionality
Allow markdown/hyperlink rendering for custom field choice sets.
I'm marking this as 'data model extension' because I imagine some tweaks to the validation will need to happen before saving the values into the database.
When creating a custom field choice set you input the value as
choice1:First Choice
It would be a great feature to be able to have markdown supported in the "First Choice" side of the input such that we can turn these values into hyperlinks.
choice1:First Choice
becomes
choice1:[First Choice](https://example.com)
Use case
Adding this ability would allow custom field choice sets to be turned into URL's.
Imagine a scenario where you have a custom field called "Business Units"
You create a custom field choice set that contains all your business unit choices:
widgets:[Widgets](https://netboxurl.com/dcim/sites/?cf_business_unit=widgets)
filters:[Filters](https://netboxurl.com/dcim/sites/?cf_business_unit=filters)
What we would very likely do is craft the URL hyperlink to be a search filter for the value of that custom field so clicking on it from the objects perspective will then take you to a search query for all objects containing that value.
Similar to how you could click on a tag and it would give you all objects with that tag, same concept.
Database changes
Likely some changes here to accept markdown/hyperlinks to be stored in the value of the tablet. Don't know for sure.
External dependencies
None that I can think of.
The text was updated successfully, but these errors were encountered: