Numeric field softformat truncates leading instead of trailing
-
Hello pods Community,
I am relativly new to pods but I already love the flexibility it gives me. Thanks for the great work.
Now I encountered a strange behavior with pods and the Plain number field.I have a custom post type where I need to use numbers with 3 to 4 decimals.
So I have set up a number field (decimals 4, softformat yes).
The page is in german so I am using , as a divider. The tooltip for softformat reads ? remove trailing decimals (0)“ which is exacly the functionality that I need.
So in my understanding it should be 0,02 instead of 0,0200 when I enter 0,02. But if softformat is enabled it seems that it is truncating the leading zeros instead of the supposed trailing. So if I enter 0,02 and save only 02 remains. This gets then displayed in frontend as 2.
When disabling softformat it gets correctly displayed but it adds the missing zeros, so 0,03 becomes 0,0300. It would be great if it wold then stay 0,03 (which is what I expected from softformat).Has anybody encountered the same thing, does anbody have an idea how to fix this?
Thanks a lot
MarcMy setup: worpress 5.0.3, pods 2.7.12
- The topic ‘Numeric field softformat truncates leading instead of trailing’ is closed to new replies.