Widget de calcul de formulaire : calcul incorrect

  • laurentsamitier
    Demandé le 4 juillet 2024 à 09:02

    Bonjour la formule de calcul basique (addition) se met à mal fonctionner et sort des quantités multipliées par 10 ou même 100 ! Cordialement

    Widget de calcul de formulaire : calcul incorrect Image 1 Screenshot 20

  • Jefferson Jotform Support
    Répondu le 4 juillet 2024 à 09:23

    Hi laurentsamitier,

    Our French Support agents are busy helping other Jotform users right now, so I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in French, let us know and we can have them do that. But, it might take a while until they're available again.

    Now, coming back to your question, I checked the screenshot you sent and saw that you have used a comma in column A (Fluide vierge), which causes the form calculation to malfunction and instead concatenate the numbers. Please note that form calculation only works with numbers and must not contain commas. I suggest using a Number field to ensure the proper function of the widget:

    Widget de calcul de formulaire : calcul incorrect Image 1 Screenshot 20

    You can also check out this guide on How to Perform Calculations Using a Widget.

    Give it a try and let us know how it goes.

  • laurentsamitier
    Répondu le 4 juillet 2024 à 09:30

    Merci pour réponse rapide. Si j'utilise "Number field", le calcul se fera correctement même avec des "comma" ?

  • laurentsamitier
    Répondu le 4 juillet 2024 à 09:32

    Et si je supprime la zone de saisie pour la remplacer par une "Number field", mes données déjà saisies vont disparaître ???

  • Lars Jotform Support
    Répondu le 4 juillet 2024 à 11:09

    Hi Laurent,

    That is correct, if a Number field is used, the calculations will be done correctly even with commas and decimals. The issue was that the number written in the Text field was treated as text, and when used for the calculation it simply extracted all the numbers out from the text so to speak. So 0,05 became just 5.

    When deleting a form field, the associated submission data for that field will also be deleted. When clicking to delete a field, you will get a warning about this, in case you'd rather hide the field and add a new one, in order to keep the existing data.

    Widget de calcul de formulaire : calcul incorrect Image 1 Screenshot 20

    Let us know if there’s anything else we can help you with.

Votre réponse