Skip to content

Hidden

Hidden renders <input type="hidden" …> only — no wrap_field, label, or helper. Use it for tenant IDs, CSRF companions the host manages, or sticky foreign keys. Unlike most fields, its render() does not short-circuit on is_visible(); keep sensitive values server-side when possible.

Each variation below includes a detailed explanation, the fluent API to paste into your schema, and light/dark screenshots of the rendered control.

Carry a constant or defaulted value through submit/dehydrate without showing UI.

app/orbit/resources/example_resource.py
Hidden.make('tenant_id')
.default('tenant_acme')

Orbit Basic hidden (light)

Orbit Basic hidden (dark)

Set defaults from closures when filling edit forms so the key always posts with the payload.

app/orbit/resources/example_resource.py
Hidden.make('owner_id')
.default(lambda record=None, **_: getattr(record, 'owner_id', None))

Orbit From record context (light)

Orbit From record context (dark)

.state_path() remaps where the value lives in nested form state when the field name should differ from the wire path.

app/orbit/resources/example_resource.py
Hidden.make('token')
.state_path('meta.invite_token')
.default('')

Orbit Custom state path (light)

Orbit Custom state path (dark)

Hidden fields still participate in Form.validate when they have a state path and rules — useful for required foreign keys.

app/orbit/resources/example_resource.py
Hidden.make('account_id')
.required()
.rules('integer')

Orbit With validation (light)

Orbit With validation (dark)

Closures work on .label(), .helper_text(), .placeholder(), .visible(), .disabled(), and .required() where applicable — see Form closures.