It can be located only within the <form-builder> component and is visually presented as follows:
<form-builder
url="/api-url"
:default="{
managers: [
{active: true, manager: 'Manager 1'},
{active: true, manager: 'Manager 2'},
{active: false, manager: 'Manager 3'}
]
}"
>
<template slot-scope="fields">
<fb-multi-block name="managers">
<template slot-scope="block">
<fb-checkbox name="active" label="Active" :id="block.id"></fb-checkbox>
<fb-input
name="manager"
label="Manager name"
:id="block.id"
:disabled="! fields[`managers[${block.id}].active`]"
></fb-input>
</template>
</fb-multi-block>
</template>
</form-builder>
@vue
Name | Type | Default | Description |
---|---|---|---|
name(*) | String |
undefined |
Field identifier in the data object |
id | Number |
undefined |
Sequence number within the <fb-multi-block> component |
label | String |
'add' |
Text in the “Add” button |