ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Number fields rounding

September 20, 2011 5:09pm

Subscribe [2]
  • #1 / Sep 20, 2011 5:09pm

    Jason Morehead

    456 posts

    I have a site running on EE 2.2.2, and the client recently reported that several fields are rounding. The fields in question are text inputs with the field content set to “Number”. The fields in question are rounding their values, but only if the values in question are larger values (e.g., “2013687”, “1262463”).

    Should I convert the fields in question to be “Integer” fields, and if I do, will I have to worry about any data loss?

  • #2 / Sep 21, 2011 2:13am

    John Henry Donovan

    12339 posts

    Jason,

    I just did a quick test and the fields converted ok with no data loss but it would be advisable to backup regardless.

    What do the numbers relate to? Are you doing anything specific with them that you need to set the field content type?

  • #3 / Sep 21, 2011 2:43am

    Jason Morehead

    456 posts

    The site is for an education-related organization. The fields contain numbers of high school/community college enrollments for various states, and some of the numbers can get pretty large. I set them as number fields primarily to force the client into entering the right kind of data and also so that I could do special formatting and/or calculations on the front-end.

  • #4 / Sep 21, 2011 3:13am

    John Henry Donovan

    12339 posts

    Jasin,

    the Integer format holds a number with 10 digits in it.
    Does that solve or at least solve your issue?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases