Skip to content

[Feature Request]: Enum field type/configurable tag box #1206

@TrigamDev

Description

@TrigamDev

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

Description

Could be seen as a little niche, but it would be nice to have a field type that emulates the functionality of an enum, allowing for one tag to be selected from a list of available choices.

Solution 1: Enum field type

A new enum field type could be added.
The allowed values could be controlled by either a whitelist or blacklist. Each entry in the whitelist/blacklist would be a tag, with an option to include it's children as well.

The field could maybe also include the option to allow for multiple tags, but that starts encroaching on the role of normal tag boxes, so that's to be decided.

Solution 2: Configurable tag box

Firstly, re-implement the ability to add multiple tag boxes to an entry.

Tag boxes could then be given configuration options. Relevant ones would be:

  • Tag blacklists/whitelists (see solution 1)
  • Min/max number of tags able to be added
  • If categories should be displayed

The user could then create their own tag box fields and configure them to function as enums, with a max of 1 tag, categories disabled, and having only the correct tags whitelisted.

Alternatives

Currently, you can just have tags representing the enum's values mixed in with the rest of the tags. This feels a little clunky, though, since each post will only have a single tag from the 'psuedo-enum', as opposed to how tags are usually combined together.
Plus, having an enum field type/tag box configuration would allow for things like blacklists/whitelists, tag amount restrictions, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions