Update: this syntax is no longer correct. For new projects generated with Phoenix 1.7.0-rc.0, the <.input type="select"/> component uses Phoenix.HTML.Form.options_for_select under the hood. Since commit 2fdb410, you’d use your original snippet with option changed to options:
<.input
field={{f, :city_id}}
type="select"
label="Choose your city"
options={Enum.map(@cities, fn city -> {city.name, city.id} end)}
/>






















