You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you're likely to get a better answer than this if you post your current schema/options objects... however, since you talk about "checkbox multiple select", I'm going to hazard a guess and say you're trying to do something like "checkbox" input example 7.
basically, if you have an "array" of "strings" in the schema, with the fields set as "checkbox" in the options, you need to have the associated data entry as an array of the string values relating to the items that are "checked".
edit: might be easier to explain with comments in example 7's code snippet..
$("#field7").alpaca({"schema": {"type": "object","properties": {"checkboxArrayEnum": {"type": "array",// <--- this makes the control show an array of items"items": {"type": "string",// <--- this tells each item that it's value is a string"enum": ["option1","option2","option3"]}}},"required": ["checkboxArrayEnum"]},"options": {"fields": {"checkboxArrayEnum": {"label": "Checkbox Array Enum","type": "checkbox",// <--- this makes each item in the array render as a checkbox"optionLabels": ["Option #1","Option #2","Option #3"]}}},"data": {"checkboxArrayEnum": ["option1","option3"]// <--- this causes `option1` and `option3` to show as "checked" in the rendered form}});
When Creating A Form Builder, How do I make the checkbox multiple select to be true as default?
The text was updated successfully, but these errors were encountered: