Hey Iād like to ask how to create a filedset in a model and how to create fields into the fieldset?
hereās my code
async function createFieldSet() {
const ModularModelBlock = await client.itemTypes.create({
name: 'BasicModularModel',
apiKey: 'basic_modular_model',
});
const fieldset = await client.fieldset.create(ModularModelBlock.id, {
title: 'test fieldset',
hint: '',
position: 1,
collapsible: true,
startCollapsed: false
});
console.log(fieldset)
}
createFieldSet()
In my code, I create a model āBasicModularModelā and create a filedset "test fieldset"in it.
and the console log shows
PS C:\work\migration> node .\test.js
{
id: '406823',
title: 'test fieldset',
hint: null,
collapsible: true,
startCollapsed: false,
position: 1,
itemType: '1548164'
}
but when I check on UI, no filed has been added into the model.
Did I do something wrong?
The second question is can someone provide an example about how to create field inside the field set?
Thanks!!