Hi,
Why is my form throws an error on my checkbox even if I checked one of the options?
I have this on my schema:
products: {
type: Boolean,
optional: true,
autoform: {
'formgroup-class': 'col-xs-10 col-sm-6',
type: "select-checkbox-inline",
options: function () {
return Products.find().map( function ( product ) {
return {
label: product.name,
value: product._id
};
} );
},
}
},
the checkboxes are correctly generated on my form from my Products collection.
Upon submission it throws validation error even if I’ve checked one of the products, it throws this error
Products must be a boolean
here’s on my template:
{{> afQuickField name="products" }}
What is the proper type for this type of field? or what is the best approach on this matter?
Thanks in advance.