The form component allows to generate forms dynamically using a JSON schema.
| Property | Type | Req | Description | Default |
|---|---|---|---|---|
| parentName | String | False | Name of the parent section. By default, it is undefined | |
| nestingLevel | String | False | This informs about the nesting level of the form. This input is only used for design purposes | 0 |
| forceValidations | Boolean | False | Boolean to force the field validations | |
| disabledSectionMessage | String | False | Message displayed when a section is disabled. This is always displayed after the section name | 'for this instance is disabled.' |
| sectionDescriptionLevel | Number | False | Level of the section to which description is displayed. By default, section descriptions are not displayed. | -1 |
| textFieldMaxWidth | Number | False | Maximum width of a field needed to paint a input or textarea | |
| errorMessages | StInputError | False | Field error translations | |
| showTooltips | Boolean | False | Enable or disable displaying of tooltips By default, tooltips are displayed | -1 |
| translations | StFormFieldTranslations | False | Field translations | |
| schema | False | {StFormSchema Form schema needed to generate the form |
| Property | Type | Description |
|---|---|---|
| valueChange | Any | Event emitted when value is changed. This emits the current form value |
| clickLink | String | Event emitted when link is clicked. It returns the field path |
<st-form [schema]="jsonSchema"
[(ngModel)]="model"
#formModel="ngModel">
</st-form>
Form Schema (StFormSchema)
Form UI Definition (StFormUIDefinition)
export interface StFormUIDefinition {
relatedTo ? : string;
visible ? : {
[key: string]: any
}