我可以将 select/option 数据类型添加到撇号 cm 小部件中的字段类型吗?
Can I add select/option data type to field type in apostrophe cm widget?
我有一个列小部件,我正在尝试创建一个预填充的下拉列表,用户可以从中选择对应于值 bootstrap class names "col-md-6"等等
addFields: [
{
type: 'select',
name: 'column1width',
label: 'Column 1 Width',
contextual: false,
options: {
name: '1 column',
value: 'col-md-1'
},
{
name: '2 column',
value: 'col-md-2'
}
},
我找到答案了
type: 'select',
name: 'column1width',
label: 'Column 1 Width',
contextual: false,
choices: [
{
label: '1 Column',
value: 'col-md-1'
},
{
label: '2 Column',
value: 'col-md-2'
}
]
我有一个列小部件,我正在尝试创建一个预填充的下拉列表,用户可以从中选择对应于值 bootstrap class names "col-md-6"等等
addFields: [
{
type: 'select',
name: 'column1width',
label: 'Column 1 Width',
contextual: false,
options: {
name: '1 column',
value: 'col-md-1'
},
{
name: '2 column',
value: 'col-md-2'
}
},
我找到答案了
type: 'select',
name: 'column1width',
label: 'Column 1 Width',
contextual: false,
choices: [
{
label: '1 Column',
value: 'col-md-1'
},
{
label: '2 Column',
value: 'col-md-2'
}
]