Skip to content

Form elements need default values that are visible #21

@gdevenyi

Description

@gdevenyi

Default values are currently settable in the zod object, but observe this degenerate case:

    noWorkStudyUnrelated: {
      description: {
        en: 'a',
        fr: 'b'
      },
      label: {
        en: 'I have not worked / studied at all during the past week for reasons unrealted to the disorder.',
        fr: "Je n'ai pas travaillé ou étudié du tout pour des raisons non liées au problème."
      },
      kind: 'boolean',
      variant: 'radio'
    },

This is rendered on the page as an empty (unselected) radio box boolean.

    noWorkStudyUnrelated: z.boolean().default(true),

This radio box actually has default value true, and if I press submit the form will be accepted with that value.

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