---
title: "hidden"
image: "https://adonia.pages.dev/og.png"
version: "next"
---

> Documentation Index
> Fetch the complete documentation index at: https://adonia.pages.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# hidden

<!-- Generated by `pnpm docs:fields` from packages/core/src/schema/fields/hidden.ts. Edit the TSDoc, not this file. -->

Non-rendering field carrying a value through the form.

| | |
| --- | --- |
| Builder | `F.hidden(attribute: string): HiddenField` |
| Wire type key | `hidden` |
| Class chain | `HiddenField` → `Field` |
| Detail projection | `text-entry` |
| Column counterpart | — *(not tabulatable)* |

## Example

```ts
import { F } from '@adonia/core'

F.hidden('authorId').valueType('number').default(42)
```

## Props

Beyond the shared [field DSL](/reference/fields#the-shared-field-dsl):

| Prop | Declared on | Behaviour |
| --- | --- | --- |
| `valueType(type: HiddenValueType): this` | `HiddenField` | Declares the underlying scalar type (§11.1). Defaults to `string`, matching what an `<input type="hidden">` submits; declare `number` or `boolean` when the attribute is one, so the validator coerces and the fill writes the right primitive instead of a numeric string. |

## Validation

Vine base: `vine.number()`, `vine.boolean()`, `vine.string()`.

§11.1 mapping: the declared underlying type, `vine.string()` by default.

Contributed by `HiddenField.vineSchema()` in `packages/core/src/schema/fields/hidden.ts`. The shared modifiers (`required`, `nullable`, `requiredWhen`, `unique`, optionality) are applied on top by `Field.buildValidation`, and a `rules()` override replaces the base entirely — the validator compiler never branches on the field class.

## Declared in

- `packages/core/src/schema/fields/hidden.ts` — `HiddenField`

Source: https://adonia.pages.dev/reference/fields/hidden/index.mdx
