Section
Similar to a Container, the Section also enables the use of components within the forms. But the difference is that sections are "collapsed" while containers are not. So, using sections will help keep the form compact and clean.
Each row in a section has three slots/columns. Placing a component auto-arranges them into a row, occupying one or more of these slots based on their size. You can change a component's "Size" attribute (Small, Medium, and Large) to make them occupy fewer or more slots - Small takes up one slot, Medium two, and Large three. So, a row can hold up to three small components, two medium components, or one large component.
You can have multiple sections within a form, and each section can be slotted one after another or within one another (component or section). (Adding labels to your sections will help organize the form.)
Example
API Methods
deleteAsset
Deletes particular asset in the section
- Method
- Usage
deleteAsset(assetId: string, options: { index: number; }): void
// Deletes the asset in a section with its Id and index
a8forms.Section("SectionId").deleteAsset("assetId", { index: 0 })
importAsset
Imports an asset at a specified path
- Method
- Usage
importAsset(assetId: string, options: { bindPrefix: string; after?: string; }): void
// Prefixes the bind and imports the asset after the required feild using the Id of the field
a8forms.Section("SectionId").importAsset("assetId",{bindPrefix:"jack",after?:"componentId"})