Skip to content

Field-specific properties

PropertyTypeDescription
currenciesstring(optional) List only a certain set of currencies: Scandinavia, Nordic, Europe or Prioritized(all currencies sorted by priority). Defaults to Prioritized.
filterCurrenciesfunction(optional) Use this prop to filter out certain currencies. The function receives the currency object and should return a boolean. Returning false will omit the currency.
sizestring(optional) Define the height of the Autocomplete. Can be set to small, default, medium and large. Defaults to default. Consider rather setting field sizes with Form.Appearance.

General properties

PropertyTypeDescription
valuestring(optional) Source data value for the field. Will take precedence over the path value given in the data context.
defaultValuestring(optional) Default source data value for the field. Will not take precedence over the path value given in the data context.
pathstring(optional) JSON Pointer for where the data for the field is located in the source dataset (when using Form.Handler or DataContext). The path will also be set as the name attribute for the string-field.
infoReact.Node
Array<React.Node>
function
(optional) Info message shown below / after the field. When provided as a function, the function will be called with the current value as argument. The second parameter is an object with { conditionally, getValueByPath, getFieldByPath }. To show the message first after the user has interacted with the field, you can call and return conditionally function with a callback and with options: conditionally(() => 'Your message', { showInitially: true })
warningReact.Node
Array<React.Node>
function
(optional) Warning message shown below / after the field. When provided as a function, the function will be called with the current value as argument. The second parameter is an object with { conditionally, getValueByPath, getFieldByPath }. To show the message first after the user has interacted with the field, you can call and return conditionally function with a callback and with options: conditionally(() => 'Your message', { showInitially: true })
errorError
FormError
Array<Error | FormError>
function
(optional) Error message shown below / after the field. When provided as a function, the function will be called with the current value as argument. The second parameter is an object with { conditionally, getValueByPath, getFieldByPath }. To show the message first after the user has interacted with the field, you can call and return conditionally function with a callback and with options: conditionally(() => 'Your message', { showInitially: true })
disabledboolean(optional) Set true to show the field but without the possibility of changing the value.
emptyValuestring
undefined
(optional) The value to use (in onChange events etc) when emptying the field. Makes it possible for instance to provide undefined instead of an empty string when clearing the content of a text input.
requiredboolean(optional) When set to true, the field will give an error if the value fails the required validation. When set to false, the field will not be required, but will add a "(optional)" suffix to the label.
labelSuffixReact.Node(optional) Will append an additional text to the label, like "(optional)". When using inheritLabel, the suffix will not be inherited. NB: The visual appearance of the labelSuffix may change in the future.
schemaobject(optional) Custom JSON Schema for validating the value.
validateInitiallyboolean(optional) Set to true to show validation based errors initially (from given value-prop or source data) before the user interacts with the field.
validateUnchangedboolean(optional) Set to true to show validation based errors when the field is touched (like focusing a field and blurring) without having changed the value. Since the user did not introduce a new error, this will apply when the value was initially invalid based on validation.
validateContinuouslyboolean(optional) Set to true to show validation based errors continuously while writing, not just when blurring the field.
errorMessagesobject(optional) Custom error messages for each type of error, overriding default messages. The messages can be a React.ReactNode or a string.
onChangeValidatorfunction(optional) Custom validator function where you can return undefined, Error, FormError or an Array with either several other validators or several Error or FormError. It is triggered on every change done by the user. The function can be either asynchronous or synchronous. The first parameter is the value, and the second parameter returns an object containing { errorMessages, connectWithPath, validators }.
onBlurValidatorfunction(optional) Custom validator function where you can return undefined, Error, FormError or an Array with either several other validators or several Error or FormError. It is triggered when the user leaves a field (e.g., blurring a text input or closing a dropdown). The function can be either asynchronous or synchronous. The first parameter is the value, and the second parameter returns an object containing { errorMessages, connectWithPath, validators }.
transformInfunction(optional) Transforms the value before its displayed in the field (e.g. input).
transformOutfunction(optional) Transforms the value before it gets forwarded to the form data object (context) or returned as the onChange value parameter. The first parameter is the internal value. Some fields do support a second parameter, like the SelectCountry, where the country object is given.
labelstring(optional) Field label to show above / before the input feature.
labelDescriptionstring(optional) A more discreet text displayed beside the label (i.e for "(optional)").
labelDescriptionInlineboolean(optional) If true, the labelDescription will be displayed on the same line as the label.
labelSrOnlyboolean(optional) Use true to make the label only readable by screen readers.
labelSizemedium
large
(optional) Define the font-size of the label based on the font-size table.
helpobject(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).
layoutstring(optional) Layout for the label and input. Can be horizontal or vertical.
layoutOptionsobject(optional) Use this to set additional options for the horizontal layout. E.g. { width: "medium" }. You can also use a custom width {number}rem. Instead of a width, you can use a min/max width. E.g. { minWidth: "6rem", maxWidth: "12rem" }.
widthstring
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.
contentWidthstring
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.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Translations

More info about translations can be found in the general localization and Eufemia Forms localization docs.

Keynb-NOen-GBsv-SEda-DK
SelectCurrency.labelValutaCurrencyValutaValuta
SelectCurrency.placeholderVelg en valutaSelect currencyVälj en valutaVælg en valuta
SelectCurrency.errorRequiredDu må velge en valuta fra listen.You must select a currency from the list.Du måste välja en valuta från listan.Du skal vælge en valuta fra listen.
Field.errorSummaryTitleFeil som må rettesPlease correct the following errorsFel som måste åtgärdasFelter der skal rettes
Field.stateSummaryOppsummering:Summary:Sammanfattning:Oversigt:
Field.errorSummaryFeil som må rettes:Please correct the following errors:Fel som måste åtgärdas:Felter der skal rettes:
Field.errorRequiredDette feltet må fylles ut.This field is required.Detta fält måste fyllas i.Dette felt skal udfyldes.
Field.errorPatternVerdien er ugyldig.The value is invalid.Värdet är ogiltigt.Ugyldig værdi.
Field.optionalLabelSuffix(valgfritt)(optional)(valfritt)(valgfrit)

List of available currencies

Link to the code of the available currencies.

NOTE: This list does not say anything about the order in which they will appear in component Field.SelectCurrency. And is only meant to easily find which currencies that's supported and available to use.

ISO 4217 codeennb
NOKNorwegian kroneNorsk krone
USDUnited States dollarAmerikansk dollar
EUREuroEuro
SEKSwedish kronaSvensk krone
DKKDanish kroneDansk krone
GBPPound sterlingBritisk pund
CHFSwiss francSveitsisk franc
JPYJapanese yenJapansk yen
AEDUnited Arab Emirates dirhamEmiratarabisk dirham
AUDAustralian dollarAustralsk dollar
BHDBahraini dinarBahrainsk dinar
BWPBotswana pulaBotswansk pula
BGNBulgarian levBulgarsk lev
CADCanadian dollarKanadisk dollar
PHPPhilippine pesoFilippinsk peso
HKDHong Kong dollarHongkongdollar
INRIndian rupeeIndisk rupi
IDRIndonesian rupiahIndonesisk rupiah
ISKIcelandic krónaIslandsk krone
ILSIsraeli new shekelNy israelsk shekel
KESKenyan shillingKenyansk shilling
CNYChinese yuanKinesisk renminbi
KWDKuwaiti dinarKuwaitisk dinar
MADMoroccan dirhamMarokkansk dirham
MXNMexican pesoMeksikansk peso
NZDNew Zealand dollarNyzealandsk dollar
OMROmani rialOmansk rial
PKRPakistani rupeePakistansk rupi
PLNPolish złotyPolsk złoty
QARQatari riyalQatarsk rijal
RONRomanian new leuRumensk leu
SARSaudi riyalSaudiarabisk rijal
SGDSingapore dollarSingaporsk dollar
LKRSri Lankan rupeeSrilankisk rupi
ZARSouth African randSørafrikansk rand
KRWSouth Korean wonSørkoreansk won
TZSTanzanian shillingTanzaniansk shilling
THBThai bahtThailandsk baht
CZKCzech korunaTsjekkisk koruna
TNDTunisian dinarTunisisk dinar
TRYTurkish liraTyrkisk lira
HUFHungarian forintUngarsk forint
CNHChinese Offshore yuanKinesisk Offshore renminbi