Closed AdmiralPsy closed 3 years ago
My thoughts on what a schema would look like is this:
{
"name": "Character",
"fields": [
{"Name": "input"}
{"Place of Birth": "input"}
{"Age": "input"}
{"Gender": "dropdown", "options": ["Male", "Female"]}
{"Short Bio": "textarea"}
}
For types of fields, I was thinking input, textarea, dropdown, and maybe radio and checkboxes. What are your thoughts on this?
So is "input" just short text? We may need a name more specific than that. Maybe we could have "multiselect" for checkboxes - we wouldn't need radio buttons if we already have dropdown. Other HTML form types that could be useful are these:
I made a stub for a schema json. I used input's type
values to make it easy and consistent for displaying and binding values. We can change it to a .js with a module to export if we use npm, but otherwise this should be good to go.
The fields of a category are represented through a JSON object known as a schema. Rules need to be defined that establish what fields are allowed in a schema and how they are represented.