Skip to content

Make the Requested amount field accepts locale formated values#4767

Open
frjo wants to merge 1 commit intomainfrom
enhancement/requested_amount_localised_input
Open

Make the Requested amount field accepts locale formated values#4767
frjo wants to merge 1 commit intomainfrom
enhancement/requested_amount_localised_input

Conversation

@frjo
Copy link
Member

@frjo frjo commented Mar 19, 2026

Fixes #4628

Add custom to_python() function to allow localised number inputs to Requested amount field. Add custom prepare_value() to make the widget use the locale correct decimal separator.

Test Steps

  • Try saving all number format you know about. 10000 can in different countries be written as "10 000", "10000.00", "10 000,00", "10.000,00", "10,000.00". They should all be saved as "10000" in the database.
  • Try to set the site to different locales and combine with different number format. All combinations should work.

…uested amount field. Add custom prepare_value to make the widget use the locale correct decimal seperator.
@frjo frjo added Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). Type: Minor Minor change, used in release drafter labels Mar 19, 2026
@frjo
Copy link
Member Author

frjo commented Mar 19, 2026

I used up a lot of Claude code tokens for this 😄. So many nitty gritty details but after hours of testing I believe (hope) it's working.

Really needs testing by other people, important that this does not mess up users data.

If we can be sure it works I think it will be a nice ux improvement, allowing users to enter values the way they are used to and Hypha takes care of the rest.

@wes-otf wes-otf self-requested a review March 19, 2026 20:58
@frjo
Copy link
Member Author

frjo commented Mar 20, 2026

@bmispelon I heard you created a solution for this already. Something similar to above or did you find a cleaner fix for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). Type: Minor Minor change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not possible to input requested amount values with thousand separator

1 participant