Skip to content

Not possible to input requested amount values with thousand separator #4628

@frjo

Description

@frjo

The "Requested amount" field only accepts values written as int or as decimal value with a period as separator.

  1. 9999
  2. 9999.99

All other format are invalid.

This leads to a bad user experience for people used to write values with a thousand separator:

  1. 9.999
  2. 9.999,99
  3. 9 999
  4. 9 999,99

Hypha will do the right thing when displaying these values. With a German locale the value "9999.99" will display correctly as "9.999,99".

But if a German user enter "9.999" it will display as "10" (rounded up) while expecting to get "9.999.00".

Hypha should somehow allow users to enter values as they are used to and the clean them before saving.

For normal fields Django has this build it it seems, see https://docs.djangoproject.com/en/4.2/topics/i18n/formatting/#locale-aware-input-in-forms

But this is a stream field so we are likely needing to build something custom.

Metadata

Metadata

Assignees

Labels

Type: BugBugs! Things that are broken :-/

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions