Yep, that’s how it’s done. Select options are a list of tuples in the form of {text, id}. I usually put it in assigns, though if it’s static it doesn’t much matter I don’t think:
category_options = Enum.map(Testing.Categories.list_categories(), &{&1.name, &1.id})
socket =
socket
|> assign(:category_options, category_options)
<.input field={@form[:category_id]} type="select" options={@category_options} />






















