Skip to content

Support building a form field that starts hidden (hidden option) #1793

Description

@KaiPressmar

Following the invitation in `docs/forms.md`'s Advanced Form Field Use section: "If an option is not supported, open an issue on Github and it will be considered for addition to the API."

The gap

There's no supported way to build a field that starts hidden — e.g. one an interactive action (see #1792 / #1790) reveals later. The Widget annotation's own visibility/print flags (`F`, distinct from the field's own `Ff` flags) are always defaulted to `4` (print only) by `formAnnotation()`, with no override, and no option maps to `F` at all.

This came up in the same interactive-form use case as #1792: a push button meant to stay hidden until a mouse-up action on a sibling button reveals it.

Proposed addition

A `hidden` option, accepted by all form annotation methods: `hidden: true` sets `F` to `6` (Hidden + Print), instead of the usual default of `4`.

I have a working implementation with tests and docs — see #1791.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions