-
Guilbault_LucieDemandé le 19 juin 2024 à 08:42
Bonjour,
Sur ce formulaire, je souhaiterais dans la question / champ actuel : "Prix final estimé (arrondi à l'entier le plus proche)" remplacer le calcul actuel en suivant la règle suivante :
Je souhaiterais en effet que le prix affiché soit cette fois-ci arrondi à l'entier décimal le plus proche soit : si le prix est à 1840 -> On arrondi à 1800. Est-ce possible ?
Pour info, ce champ est basé sur la valeur précédente qui est déterminée dans le champ "Chiffre après prix du client -9%".
Merci d'avance,
Lucie
-
Princess Jotform SupportRépondu le 19 juin 2024 à 10:37
Hi Lucie,
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, unfortunately, there's no built-in function (fx) that we can use to round the field's value from 1840 to 1800. The following are functions’ arguments that you can use in rounding numbers/calculations in your form:
- Round Decimals Upward Form Template using ceil() function - Round up a number to its nearest integer. If the value is a full number, it will not be rounded. Example: ceil(1.3) = 2.
- Round Off Number Form Template with round() function - Round a number to the nearest integer. Example: round(2.5) = 3.
If you want to learn more about functions you can use with the Form Calculation widget, you can check out this guide on Form Calculation - Math Function Reference.
If that’s not exactly what you’re looking for, can you explain a bit more, so we can help you better? It would also help us to understand what’s happening if you could take a screenshot and send it to us. We have a guide here explaining how to do that.
Give it a try and let us know if there’s anything else we can help you with.
-
Guilbault LucieRépondu le 20 juin 2024 à 03:34
Hi,
Thanks for your answer, I was indeed looking to round a price from 1840 to 1800 but if you say it's impossible, then I won't implement it. Is this something that could be submitted to the dev team by any chance?
Thanks
Lucie
-
Raymond Jotform SupportRépondu le 20 juin 2024 à 05:41
Hi Lucie,
To round a number from another field to the nearest hundredths, we can do that with the Form Calculation widget. Let me show you how to do that:
- In Form Builder, click on the Add Element button on the left and under the Widgets tab click on the Form Calculation widget.
- Next, use the Function, Add Field, and operators within the Form Calculation Settings to replicate the same formula below:
Here's how the form will work:
Feel free to test this demo form or clone it to your account to inspect it further. We also have a guide on How to Perform Calculations Using a Widget that you can check out.
Give it a try and let us know if you need any help.
-
Lucie GuilbaultRépondu le 20 juin 2024 à 12:40
Hi,
Thanks very much, it worked perfectly !
Cheers,
Lucie