Skip to content

Allow number or boolean form fields to use .as('hidden') #14694

@cofl

Description

@cofl

Describe the problem

Only string form fields can use .as('hidden', initial). Number fields cannot use that type.

Describe the proposed solution

Allowing number fields to be .as('hidden'). While we're here, also allowing boolean fields, since there is special-case handling for those.

Alternatives considered

Changing my validation schema and backend API routes to return and accept string IDs instead of numeric IDs.

Importance

nice to have

Additional Information

I have a proof-of-concept implementation here: 0704908...cofl:sveltekit:main

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