Skip to content

Enhancement: Add initial data support for checkbox #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2023

Conversation

saicheck2233
Copy link
Owner

Description: Add initial data support for checkbox so data can be initialized upon generation of the form. Below is the schema used:
Schema:

{
  "$schema": "http://json-schema.org/draft-03/schema#",
  "type": "object",
  "properties": {
    "animal": {
      "type": "boolean",
      "title": "Animals",
      "format": "checkbox",
      "enum": ["Cat", "Dog", "Mouse"],
      "description": "Checkbox with initial data"
    }
  }
}

Initial data:

{
  "animal": ["Dog", "Mouse"]
}

Pic before changes:
image
image
Initial data is defined but doesn’t reflects on the generated form.

Pic after changes:

image
Now the value defined in the initial data schema is ticked.

@saicheck2233 saicheck2233 merged commit 2a67c5e into master Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants