I have a small form that has default values for some checkboxes for example, there is an person model, when the checkbox "dog" in the form generated by formly is clicked it will add to an array of "pets" the string of dog that forms part of the person model. How can I achieve this with formly?
{
key: "dog",
type: "checkbox",
templateOptions: {
???
}
}
Form example:
Person name: Joe
Pets:
[x] dog
This will set the model to:
{
"name": "Joe"
"pets": [ "dog" ]
}