Jump to content

Does FieldtypeDecimal work for you?


bernhard
 Share

Recommended Posts

No matter what I try I end up with an empty decimal field.

I tried inputting 1.5 as well as 1,5. I also tried both settings for the input-type (text/number). Decimals is set to 2. I can only store integer numbers.

Could you please try that so that I know if I should invest more time? Thx!

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 2/24/2022 at 3:14 PM, bernhard said:

I tried inputting 1.5 as well as 1,5. I also tried both settings for the input-type (text/number). Decimals is set to 2. I can only store integer numbers.

I just tried with PW 3.0.191 and kept everything default.
Seems to work for me with a dot as a separator but not with a comma. Comma leaves the field empty afer save.

  • Thanks 1
Link to comment
Share on other sites

Somehow this does not work for me... I had to change the fieldtype to text which is less than ideal but as it's a private project I'll leave that for now... If anybody finds out something please let me know. I think it might also have something to do with locale settings. Dumping the value showed 1,23 but the value was not stored in the DB (sql error data truncated...). Weird.

Link to comment
Share on other sites

  • 1 month later...

Same here. I found out that fieldtype decimal is not ready for different locale settings.

English with '.' separator works perfect. But. If you have for example installed the German lang pack or default lang is German the separator is now ',' and not a dot. Defined by correct locale 'de_DE.UTF-8' in language > translate > LanguageSupport.module. As German backend user already filled decimal fields are just showed and saved as blank. Plus you can't add correct data as German editor. It gets always cutted to integer without all digits.

I was so pleased about this decimal feature. Unfortunately state today it's only safe usable by single language sites with '.' as language decimal seperator. Only one language with different decimal seperator could result in serious trouble and lost of field values by editing pages...

I think this module multilang problem is fixable. Fieldtype float works in same language contexts correct. Maybe with a bug report.

locale.png

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...