Jump to content


Photo

Wrong saving behaviour for integer fields.


  • Please log in to reply
2 replies to this topic

#1 vknt

vknt

    Full Member

  • Members
  • PipPipPip
  • 72 posts
  • 9

Posted 18 April 2012 - 03:52 AM

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?

#2 ryan

ryan

    Hero Member

  • Administrators
  • 5,771 posts
  • 3107

  • LocationAtlanta, GA

Posted 18 April 2012 - 09:28 AM

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.

#3 vknt

vknt

    Full Member

  • Members
  • PipPipPip
  • 72 posts
  • 9

Posted 19 April 2012 - 03:57 AM

Great, thanks Ryan!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users