We track the type of the value in a hidden param called `_union_type`. You can use this to show a different form depending on the type of thing.
## Changing the type of a union form
If you want to let the user _change_ the union type, you would use `AshPhoenix.Form.remove_form/3` and `AshPhoenix.Form.add_form/3`. See the example below for the template, and here is an example event handler
If one of your union values is a _non_ embedded type, like `:integer`, it will still be a nested form, but you would access the single value with `<.input field={nested_form[:value]} .../>`
## Example
We might have a form like this:
```heex
<.inputs_for:let={fc}field={@form[:content]}>
<!-- Dropdown for setting the union type -->
<.input
field={fc[:_union_type}
phx-change="type-changed"
type="select"
options={[Normal: "normal", Special: "special"]}
/>
<!-- switch on the union type to display a form -->