# `MailglassAdmin.Preview.AssignsForm`
[🔗](https://github.com/szTheory/mailglass/blob/v1.0.0/lib/mailglass_admin/preview/assigns_form.ex#L1)

Type-inferred assigns form per 05-UI-SPEC §"Assigns form — type-inferred
fields" (lines 354-368) + 05-RESEARCH.md lines 1470-1571.

Walks the scenario defaults map and renders an input per key dispatched
by the Elixir type of the default value:

  | Type              | Input                                       |
  |-------------------|---------------------------------------------|
  | `binary` (String) | `<input type="text">`                       |
  | `integer`         | `<input type="number" step="1">`            |
  | `float`           | `<input type="number" step="any">`          |
  | `boolean`         | `<input type="checkbox">`                   |
  | `atom`            | disabled text input (v0.1 — URL edit only)  |
  | `DateTime`        | `<input type="datetime-local">`             |
  | `Date`            | `<input type="date">`                       |
  | struct            | `<textarea>` JSON (struct label)            |
  | `map`             | `<textarea>` JSON (plain map)               |
  | fallback          | disabled `<input>` "(unsupported type)"     |

Form fires `phx-change="assigns_changed"` on every field edit; the
LiveView re-calls the mailable function with updated assigns and pipes
through `Mailglass.Renderer.render/1`.

Action buttons use the verb+noun copy locked in 05-UI-SPEC Copywriting
Contract lines 453-458: "Render preview" + "Reset assigns". The voice
test greps the rendered HTML for these exact strings.

Boundary classification: submodule auto-classifies into the
`MailglassAdmin` root boundary.

# `assigns_form`
*since 0.1.0* 

Renders the assigns form for the current scenario.

## Attributes

* `scenario_assigns` (`:map`) (required)

# `field`

## Attributes

* `key` (`:atom`) (required)
* `value` (`:any`) (required)

---

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