Skip to content

SiFormItemComponent documentation

import { SiFormItemComponent } from '@siemens/element-ng/form';

Input Properties

Name Type Default Description
disableErrorPrinting
boolean false

Disables the automatic error printing. Error printing will be enabled by default in v46.

formErrorMapper
SiFormValidationErrorMapper | undefined

Maps validation errors of the contained control to custom messages.

label required
TranslatableString

The label to be displayed in the form item. It will be translated if a translation key is available.

labelWidth
string | number | undefined

A custom width value to be applied to the label. A value of 0 is allowed as well to visually hide away the label area.

Numbers will be converted to pixels. Using numbers is discouraged and might be dropped.

Example:

labelWidth="100px"
required
boolean false

Defines that this form item is required for the overall form to be valid.

Types Documentation

import type { SiFormValidationErrorMapper } from '@siemens/element-ng/form';

Interface for form error mapper. It resolves a key to either a translatable string or function which is called with the validation error for its key and should return a translatable string.

Properties
Index Signatures

import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';

Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.

Properties


Except where otherwise noted, content on this site is licensed under MIT License.