• Hello,
    I have a few fields set to accept Decimal input according to your instructions earlier.

    The field is “Warranty”. In the database, it is set to decimal (2,2).

    In the plugin, the field is set to Numeric – step::0.01

    When we enter .5, it accepts .5.
    If we enter .25, it accepts .25.

    If we enter and whole number, it changes it to .99 upon save.

    We are having this is issue with other decimal fields, too.

    I must have something set wrong?

    Many thanks for your help.

    Louanna

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter lighttherapyoptions

    (@lighttherapyoptions)

    Another field set to decimal 4,2 will not accept a number over 99.99.

    In another issue, I have set the price field to Decimal 6,2 in the database repeatedly and it keeps changing itself back to bigint20.

    I am wondering if the input needs to be decimal.
    It is numeric data, for sure.
    Most of it is decimal data.
    However, I don’t need to do math with it.
    I would like to be able to sort it in ascending and descending order, at least.
    If the data is not a number and we just put it in a text line, will it sort numerically?

    Thanks again,
    Louanna

    Plugin Author xnau webdesign

    (@xnau)

    It appears I made a mistake. The values for defining a DECIMAL field in MySql are (total length, places after the decimal point) so the first value is not the number of places before the decimal point.

    So, if you want to store numbers up to 99.99, the configuration of the DECIMAL field should be (4,2)

    Very sorry about that, but I learned something!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Decimal Fields Changing Upon Save’ is closed to new replies.