# `PdfElixide.Form`
[🔗](https://github.com/r8/pdf_elixide/blob/v0.3.1/lib/pdf_elixide/form.ex#L1)

Representation of the form fields within a PDF document.

# `source`

```elixir
@type source() :: PdfElixide.Document.t() | PdfElixide.Editor.t()
```

# `fields`

```elixir
@spec fields(source()) :: {:ok, [PdfElixide.Form.Field.t()]} | {:error, term()}
```

Extracts form fields from the given PDF document or editor.

# `fields!`

```elixir
@spec fields!(source()) :: [PdfElixide.Form.Field.t()]
```

Extracts form fields from the given PDF document or editor,
raising an error if it fails.

# `set_value`

```elixir
@spec set_value(PdfElixide.Editor.t(), String.t(), PdfElixide.Form.Field.value()) ::
  :ok | {:error, term()}
```

Sets the value of an existing form field on the given editor.

The value uses the same tagged-tuple shape returned by `fields/1`
(e.g. `{:text, "Jane Doe"}`, `{:boolean, true}`, `nil`).

# `set_value!`

```elixir
@spec set_value!(PdfElixide.Editor.t(), String.t(), PdfElixide.Form.Field.value()) ::
  :ok
```

Sets the value of an existing form field on the given editor,
raising an error if it fails.

---

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