You're seeing just the function select, go back to Cldr.HTML.Territory module for more information.
Link to this function

select(form, field, options \\ [])

View Source


  form :: Phoenix.HTML.Form.t(),
  field :: Phoenix.HTML.Form.field(),
) ::
  | {:error, {Cldr.UnknownTerritoryError, binary()}}
  | {:error, {Cldr.UnknownLocaleError, binary()}}

Generate an HTML select tag for a territory list that can be used with a Phoenix.HTML.Form.t.


  • A Phoenix.HTML.Form.t() form

  • A Phoenix.HTML.Form.field() field

  • A Keyword.t() list of options


For select options see

  • :territories defines the list of territories to be displayed in the the select tag. The list defaults to the territories returned by Cldr.known_territories/0.

  • :style is the format of the territory name to be used. The options are :standard (the default), :short and :variant. Not all territories have :short or :variant names in which case :standard is used for those territories.

  • :locale defines the locale to be used to localise the description of the territories. The default is the locale returned by Cldr.get_locale/1

  • :backend is any backend module. The default is Cldr.default_backend!/0

  • :mapper is a function that creates the text to be displayed in the select tag for each territory. It is passed the territory definition as a map containing the keys :territory_code, :name and :flag. The default function is &({&1.flag <> " " <> &, &1.territory_code})

  • :selected identifies the territory that is to be selected by default in the select tag. The default is nil. This is passed unmodified to

  • :prompt is a prompt displayed at the top of the select box. This is passed unmodified to


 =>, :territory, selected: :AU)
 =>, :territory, selected: :AU, locale: "ar")
 =>, :territory, territories: [:US, :AU, :JP],
      mapper: &({&, &1.territory_code}))