Jump to content

Wrong saving behaviour for integer fields.


vknt
 Share

Recommended Posts

Hi,

I just noticed that if you put float values in an integer field it will completely ignore the decimal point.

e.g. I put in 244.5 > it will save 2445

Most of the times the enduser doesn't realize it should be an integer and just copy pastes values in there.

Am I seeing this the wrong way or should the integer field automatically round off the values before it saves?

  • Like 1
Link to comment
Share on other sites

The field only accepts digits, so something like a decimal point gets stripped. However, I think this can be solved by me just adding a float check in it's sanitizeValue() function, so I will add this.

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...