Skip to content

Enhancement: Add initial data support for checkbox#21

Merged
saicheck2233 merged 1 commit intomasterfrom
new_AddInitialDataSupportForCheckbox
Jul 15, 2023
Merged

Enhancement: Add initial data support for checkbox#21
saicheck2233 merged 1 commit intomasterfrom
new_AddInitialDataSupportForCheckbox

Conversation

@saicheck2233
Copy link
Copy Markdown
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