Components
Checkbox
Example
const fields: IField[] = [
{
type: 'checkbox', // required
name: 'check1', // required
attributes: {
id: 'check1', // required
label: 'Checkbox B', // optional
classes: ['checker'] // optional
},
extra: {
items: [
// required
{
name: 'item1',
value: 'value1',
title: 'Value 1'
},
{
name: 'item2',
value: 'value2',
title: 'Value 2'
}
]
},
prefix: {
tag: 'div',
classes: ['form-group']
}
},
{
type: 'checkbox',
name: 'check2',
attributes: {
id: 'check2',
label: 'Checkbox A:',
classes: ['checker']
},
extra: {
aligne: 'inline',
items: [
{
name: 'item3',
value: 'value 3',
title: 'Value 3'
},
{
name: 'item4',
value: 'value4',
title: 'Value 4'
}
]
},
prefix: {
tag: 'div',
classes: ['form-group']
}
}
];
Result