Skip to main content

Human-readable Enum Labels

It can be useful to have human-readable labels for drop downs (enums) while having a machine-readable value. Below is an example of presenting a color choice of red, green, or blue to a user while submitting a hex value to Massdriver.

title: Human-readable Enum Labels
type: object
title: Favorite Color
type: string
- title: Red
const: "#ff0000"
- title: Green
const: "#00ff00"
- title: Blue
const: "#0000ff"