Properties
Field-specific properties
| Property | Type | Description |
|---|---|---|
countryCode | Path string | (optional) Defines which country the postal code and city is for, based on the ISO 3166-1 alpha-2 code i.e. NO, DE etc. Setting it to anything other than NO will remove the default norwegian postal code pattern. You can also use the value of another field to define the countryCode, by using a path value i.e. /myCountryCodePath. Defaults to NO. |
postalCode | object | (required) Properties for the Field.String component for postal code. |
city | object | (required) Properties for the Field.String component for city. |
help | object | (optional) Provide help content for the field using title and content as a string or React.Node. Additionally, you can set open to true to display the inline help, set the breakout property to false to disable the breakout of the inline help content, or use renderAs set to dialog to render the content in a Dialog (recommended for larger amounts of content). |
size | string number | (optional) The sizes you can choose is default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size={2} then it will be forwarded as the input element attribute. Consider rather setting field sizes with Form.Appearance. |
General properties
| Property | Type | Description |
|---|---|---|
labelDescriptionInline | boolean | (optional) If true, the labelDescription will be displayed on the same line as the label. |
labelSrOnly | boolean | (optional) Use true to make the label only readable by screen readers. |
labelSize | string false | (optional) Define one of the following heading sizes: medium or large. |
help | object | (optional) Provide help content for the field using title and content as a string or React.Node. Additionally, you can set open to true to display the inline help, set the breakout property to false to disable the breakout of the inline help content, or use renderAs set to dialog to render the content in a Dialog (recommended for larger amounts of content). |
width | string false | (optional) Will set the width for the whole block. Use small, medium, large for predefined standard widths. You can also set a custom width {number}rem or use stretch or false. |
contentWidth | string false | (optional) Will set the width for its contents. Use small, medium, large for predefined standard widths. You can also set a custom width {number}rem or use stretch or false. |
Space | string object | (optional) Spacing properties like top or bottom are supported. |
labelHeight | string | (optional) Defines the height of an component (size prop), so the label can be aligned correctly. Can be default, small, medium, large. |
asFieldset | boolean | (optional) Use true when you have several form elements. This way a fieldset with a legend is used. |
align | string false | (optional) center or bottom for aligning the contents vertically. Defaults to bottom. |
disableStatusSummary | boolean | (optional) Use true to disable the error summary. |
composition | true | (optional) Use true for when you have more than one field wrapped. |
disabled | boolean | (optional) Set true to make the inner FormLabel behave as disabled. |
Translations
More info about translations can be found in the general localization and Eufemia Forms localization docs.
| Key | nb-NO | en-GB | sv-SE | da-DK |
|---|---|---|---|---|
PostalCode.label | Postnr. | Postc. | Postnr. | Postnr. |
PostalCode.errorRequired | Du må fylle inn et postnummer. | You must enter a postal code. | Du måste fylla i ett postnummer. | Du skal udfylde et postnummer. |
PostalCode.errorPattern | Dette er ikke et gyldig postnummer (fire siffer). | This is not a valid postal code (four-digits). | Detta är inte ett giltigt postnummer (fyra siffror). | Dette er ikke et gyldigt postnummer (fire cifre). |
City.label | Sted | City | Ort | By |
City.errorRequired | Du må fylle inn et stedsnavn. | You must enter a city name. | Du måste fylla i ett ortsnamn. | Du skal udfylde et bynavn. |
City.errorPattern | Stedsnavn kan kun inneholde bokstaver og gyldige tegn som bindestrek og mellomrom. | City names can only contain letters and valid characters such as hyphens and spaces. | Ortsnamn kan endast innehålla bokstäver och giltiga tecken som bindestreck och mellanslag. | Bynavn må kun indeholde bogstaver og gyldige tegn som bindestreg og mellemrum. |
Field.errorSummaryTitle | Feil som må rettes | Please correct the following errors | Fel som måste åtgärdas | Felter der skal rettes |
Field.stateSummary | Oppsummering: | Summary: | Sammanfattning: | Oversigt: |
Field.errorSummary | Feil som må rettes: | Please correct the following errors: | Fel som måste åtgärdas: | Felter der skal rettes: |
Field.errorRequired | Dette feltet må fylles ut. | This field is required. | Detta fält måste fyllas i. | Dette felt skal udfyldes. |
Field.errorPattern | Verdien er ugyldig. | The value is invalid. | Värdet är ogiltigt. | Ugyldig værdi. |
Field.optionalLabelSuffix | (valgfritt) | (optional) | (valfritt) | (valgfrit) |