Okay
  Public Ticket #2616393
Found bug with numbers
Closed

Comments

  • Robert started the conversation

    Hi,

    I am using wpDataTables together with Gravity Forms integration. I discovered a bug.

    - having a Gravity form with a number field (field type is number); entering numbers with decimals, e.g. 12,5

    - displaying this in wpDataForms with data column type "Float"

    Then the decimals after comma are cutted, when displayed in table. Example above results in 12,0 instead of expected 12,5 in table view.

    It only works, if I set data column type in wpDataTables to "String", but it is a float value and I want to use a formular column based on the given decimal value which is only possible with data type "Float" or "Integer".

    Expected behaviour: Gravity Forms fields with type "Number" are usable in wpDataForms with data type "Float" and "Integer" and are rounded correctly.

    Thanks for feedback and best regards,
    Robert

  •  2,572
    Aleksandar replied

    Hello Robert

    wpDataTables needs to have the same number format as Gravity Forms.

    If I'm not mistaken, they are saved as 1.000,00 (comma being the decimal separator), so that's how wpDataTables needs to be set as well.

    Please go to wpDataTables settings, and select the same number format as it is in Gravity Forms.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Robert replied

    Hello Aleksandar,

    thanks for your reply. Problem is, I cannot set the appropriate number format in wpDataTables, because it is not given as so. 

    You recommended to set number format in wpDataForms to match numbers like 1.000,00 (thousands seperator, two decimal places) like Gravity Forms uses , but this is not possible. 

    In wpDataForms I can set "column type" (in "Data" Tab) to "Float", so the number can have decimal places, but with "Float" I do not have the possibility to set a "thousands separator" - this is only possible with Column type "Integer", which - on the other hand  - does not have a decimal seperator.

    I looked in the database of Gravity forms, the number value is stored like "34.45", no matter how I set the number format in Gravity Forms (two possibilities: 1.000,00 or 1,000.00). Furthermore, any field in database is stored as LONGTEXT, no matter, if it is a number or text format. So wpDataForms has - in any case - to cast the value to the appropriate format, which it doesn't. A bug, I assume.

    What do you think?

    Best regards,
    Robert

  •  2,572
    Aleksandar replied

    Hello again Robert.

    Numbers in Gravity forms are saved in US format by default:

    8369919557.png

    When the format in wpDataTables is set to a different format (15.000,00 instead of 15,000.00), the form's entries:

    8516138266.png

    Are displayed incorrectly:

    8922805162.png

    Notice 12.3 in Gravity is displayed as 12,00 in wpDataTables. First thing to mention here, though, is that the column type in wpDataTable needs to be changed from Integer to Float.

    But, if I change the number format in wpDataTables settings:

    1575838985.png

    The table displays the numbers correctly:

    9983045597.png

    All entries are saved in the same column in the database, but Gravity Forms stores numbers in US format, so even if you change the format in Gravity forms from 9,999.00 to 9.999,00 it is still saved as 9,999.00 in the database.

    That is why wpDataTables need to have the number format saved as 15,000.00, and the column changed from Integer to Float in order to display the number correctly.

    There are no bugs in this regard, but a simple limitation coming from the way Gravity stores its data in the database.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Robert replied

    Hi Aleksandar,

    okay, like you described, worked: changing the configuration of "Number format" did the trick. BUT: this is a global configuration and not limited to the Gravity forms table! That is not satisfying, beacause now every table I have on my website, is displayed in the wrong format.

    I think, this is *thumbs down* for a € 70 p.a. plugin.

    Greetings,Robert

  •  2,572
    Aleksandar replied

    Hi again Robert

    I'm sorry to hear you're not satisfied, but to be fair in all this, why isn't it a *thumbs down* for Gravity Forms which save the number in US-based format regardless of what you choose in their settings?

    If a number format in Gravity Forms is set to 9.999,00:

    2025939558.png

    It should be saved like that, right? But, submitting this:

    6597479814.png

    Results in this, in wp_gf_entry_meta table in the database:

    8194991128.png

    It's not saved with a comma, but with a point as a decimal separator.

    So, wpDataTables' add-on not only pulls the numerical data from (like you said) a "longtext" column (it converts text into numbers); but it's also supposed to guess the format which Gravity Forms doesn't respect? If you set a format in Gravity forms, to have a comma as a decimal separator, and they still save it in US number format, how can wpDataTables guess that? Gravity Forms is doing that programmatically in front-end.

    I'm sorry you're disappointed, but this is not something the plugin can do.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Robert replied

    Hi Aleksandar,

    thanks for your reply.

    So, wpDataTables Gravity Forms Integration is not suitable for my needs. I would like to give it back and have a refund. I read, that you offer this in between two weeks after purchase.

    How works refund process? What I have to do?

    Thanks,
    Robert

  •  2,572
    Aleksandar replied

    Sure thing, Robert

    Please log into http://store.tms-plugins.com/ with the credentials you received in your e-mail when you purchased the plugin, then navigate to Purchases/Gravity Forms Integration for wpDataTables, and you will see the "Request Refund" button.

    6366610744.png

    If you don't see it, and you're using a screen with width lower than 1600px, you will need to scroll through that screen horizontally to see the button.

    After you submit a refund request, you will not receive any confirmation emails, but you will see that the button is grayed out:

    9137845838.png

    That means that the refund request is successfully submitted, and that you will receive your refund in 5 - 7 business days.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables