Forms layout - Code
Using custom layout
To align form-ready components in a complex form layout, you typically omit the label attribute and define the label
as an ix-field-label component.
You can follow the example here:
- Define the
ix-inputcomponent including anidattribute.
<ix-input id="mytest"></ix-input>
- Define an
ix-field-labelcomponent with aforattribute to link the label to theix-inputcomponent.
<ix-field-label htmlFor="mytest">Test</ix-field-label>
- Define an
ix-helper-textcomponent with aforattribute to link the helper text to theix-inputcomponent.
<ix-helper-text
htmlFor="mytest"
helperText="Helper text"
invalidText="Error text"
validText="Valid text"
warningText="Warning text"
infoText="Info text"
></ix-helper-text>