Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Radio

Single-value selection from predefined options, rendered as radio buttons.

SQLite Storage

TEXT column storing the selected value.

Definition

crap.fields.radio({
    name = "priority",
    required = true,
    options = {
        { label = "Low", value = "low" },
        { label = "Medium", value = "medium" },
        { label = "High", value = "high" },
    },
})

Options Format

Each option is a table with:

PropertyTypeDescription
labelstringDisplay text in the admin UI
valuestringStored value in the database

Admin Rendering

Renders as a group of radio buttons (one selectable at a time). Functionally identical to Select but with a different UI presentation — use radio when there are few options and you want them all visible at once.