Naveen Babu
Naveen Babu

Reputation: 1584

Currency formatting issue in Orbeon forms

I am trying to use the currency field in Orbeon to show a value as a currency, e.g.: $123123213213.00. I am trying to do this with:

<fr:currency bind="balance">
    <xforms:alert>Required</xforms:alert>
</fr:currency>

I had the following problems:

  1. The field has been losing its precision after 17 digits: 12345678901234567890123 changes to 12345678901234567000000.00 on blur.
  2. I can't get the maxlength attribute on the fr:currency to work.

Has anyone come across such an issue and happened to solve it? Also, please let me know if there is any alternative to this problem, like some custom formatting.

Upvotes: 1

Views: 486

Answers (1)

avernet
avernet

Reputation: 31753

Very good point on the number precision. Support for very large amounts (without any set limit) is now implemented in the currency component, and will be included in nightly builds starting 2011-03-07. For reference, see the commit and bug.

As to the second part of your question regarding the maxlength attribute, simply the fr:currency doesn't support any such attribute. If you want to set the width of the field, you can use CSS.

Upvotes: 1

Related Questions