Currency Formatting

I have field where I am calculating subtotals & totals. That field is formatted to display as a currency using the following code:

fd.field('Total').widget.setOptions({format: "c", min: 0});

I am being told by international customers that the currency fields are displaying in their local currency (rather than always showing up as US dollars). Is there an formatting option that can override the local currency setting & always use US dollars?

Hello @kfarren,

You can specify the culture of the numeric field like this:

fd.field('Total').widget.setOptions({culture: 'en-US', format: "c", min: 0});
1 Like

Perfect. Thank you so much!

1 Like

Hi,

What should be changed to display the currency in Euro €? Changing culture: 'en-US', to culture: 'de-DE', did not work. Also, how can I change the currency in the datatable?

Hello @patrickk,

You can change the culture of the whole form using the code:

fd.culture = 'de-DE';

Add the code outside of all events.

1 Like