# `Phoenix.HTML.FormField`
[🔗](https://github.com/phoenixframework/phoenix_html/blob/v4.4.0/lib/phoenix_html/form_field.ex#L1)

The struct returned by `form[field]`.

It has the following fields:

  * `:errors` - a list of errors belonging to the field
  * `:field` - the field name as an atom or a string
  * `:form` - the parent `form` struct
  * `:id` - the `id` to be used as form input as a string
  * `:name` - the `name` to be used as form input as a string
  * `:value` - the value for the input

This struct also implements the `Access` behaviour,
but raises if you try to access a field that is not defined.

# `t`

```elixir
@type t() :: %Phoenix.HTML.FormField{
  errors: [term()],
  field: Phoenix.HTML.Form.field(),
  form: Phoenix.HTML.Form.t(),
  id: String.t(),
  name: String.t(),
  value: term()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
