Home > @i2analyze/i2connect > services > SectionedForm
services.SectionedForm type
A form with sections for an i2 Connect service.
Signature:
type SectionedForm = Record<string, IFormSection>;
References: IFormSection
Introduced: API version 2.0
Example
addService(
{
id: 'exampleSectionedForms',
name: 'Example Sectioned Forms',
description: 'A service that contains a sectioned form',
form: {
section1: {
title: 'Section 1',
conditions: {
id: {
label: 'id',
logicalType: 'singleLineString',
isMandatory: true,
},
},
},
section2: {
title: 'Section 2',
conditions: {
id: {
label: 'id',
logicalType: 'singleLineString',
isMandatory: true,
},
},
},
},
},
({ sections: { section1, section2 } }) => {
console.log(`Section 1 id: ${section1.id}`);
console.log(`Section 2 id: ${section2.id}`);
}
);