Depending on the radio buttons selected price shows either with 2 decimal places or 1 decimal place with same setup (ALMOST FIXED)

  • AA_C
    Asked on May 14, 2016 at 3:41 PM

    When I select Oui that I am a member it uses 2 decimal points for total, when I select Non it uses 1 decimal point for total. I don't understand why?

  • Ben
    Replied on May 14, 2016 at 3:52 PM

    The reason why that was happening Robert is because you have used conditions to add the value into the form calculation, while you have set the form calculation to show 0,00 all the time.

    I personally suggest to either use conditions on a textbox or use form calculation on its own, without any conditions adding value into it.

    You can use conditions to get data from it, just I would not recommend adding it into it.

    For example, what I tend to do if I need power of conditions and form calculation is to add the field to the form which I grab into the form calculation (by adding it in) and then use conditions to fill out that field (not the form calculation), which works just right ;)

    On your form, I have done the following:

    1. Disabled conditions that added value into the box

    2. set the form calculation as shown on the following screenshot:

    Depending on the radio buttons selected price shows either with 2 decimal places or 1 decimal place with same setup (ALMOST FIXED) Image 1 Screenshot 20

    I did it on the form I shared with you on the previous thread: https://form.jotform.com/61345830191957

  • AA_C
    Replied on May 14, 2016 at 4:21 PM

    Hi Ben,

    If you look at the English equivalent form I get the trailing 0's weather I select member or non member. 61013950784960

    I was messing around with the French one today and added some additional conditions that offered nothing. I will be removing them. Your confusing me a bit with this $ USD thingy.

    We don't offer a US $ option. Canadian dollars only, a bit of a bargain for our American friends.

    Thanks Robert

  • Ben
    Replied on May 14, 2016 at 5:52 PM

    Sorry about that, my bad. the nicer looking dollars then it is ;)

    The same however applies as mentioned above.

    I have updated the form to show CAD only, while the rest is completely the same.

  • AA_C
    Replied on May 14, 2016 at 9:48 PM

    Ben... That's quite all right... Nicer looking but only worth .78c  

    This is the same solution you offered for the other issue... Good work two in one.

     

    If only all were so easy..

    Many thanks,

    Robert

  • Elton Support Team Lead
    Replied on May 15, 2016 at 1:00 AM

    Glad my colleague's solution helped. 

    If there's anything else you need help with, or if you need further clarifications, let us know.

  • AA_C
    Replied on May 15, 2016 at 9:43 AM

    Hi JF,

    I just realized although this solution solves the issue with the user seeing the dollar in the correct format it is not the answer to the original question.

    When I select Oui that I am a member it uses 2 decimal points for total, when I select Non it uses 1 decimal point for total. I don't understand why?

    I have removed the redundant conditions as Ben indicated.

    What I view is for the Oui value I get 6.00 and for Non I get 7.5 not 7.50. This is a bit confusing as conditions are Identical only the value is different. I use the same logic conditions on the English form (61013950784960) and get the required results.

    This may be a mute point now as Ben's solution hides this from the end user, .... it just bugs me.

    So no urgency no this one, just a I would like to know why.

    Robert

  • Kevin Support Team Lead
    Replied on May 15, 2016 at 12:01 PM

    After spending some time I found why this is happening, there is an option in the Form Calculation widget that allows to show all decimal numbers even when they are 0. 

    Depending on the radio buttons selected price shows either with 2 decimal places or 1 decimal place with same setup (ALMOST FIXED) Image 1 Screenshot 30

    You should mark this option and the widget will show all the decimals exactly like you want, I made a sample form to show you how it works, you can take a look on this link: https://form.jotform.com/61354434120949

    Depending on the radio buttons selected price shows either with 2 decimal places or 1 decimal place with same setup (ALMOST FIXED) Image 2 Screenshot 41

    Feel free to clone it

    So you need to make sure this option is marked in order to show 2 decimals, otherwise your result will be showing only one or if the result is, for example, 10.00 the result will be added without the decimals 10 only. 

    Hope this helps. 

  • AA_C
    Replied on May 16, 2016 at 10:24 AM

    Hi, 

    I see what you have done and it works just fine but I don't see how to do this on my form 53464905175965. I already have the "Show empty decimal places" checked on my calculations. 

    Can you clone my form and show me how Please? 

    As I said it works just fine on my English version; 61013950784960. 

     

    Thank you, 

     

    Robert

  • Elton Support Team Lead
    Replied on May 16, 2016 at 11:56 AM

    Hello Robert,

    Were you able to resolve this? When I cloned your form, I can see that both Oui and Non total contains 2 decimal places.

    Example:

    Depending on the radio buttons selected price shows either with 2 decimal places or 1 decimal place with same setup (ALMOST FIXED) Image 1 Screenshot 30

    Depending on the radio buttons selected price shows either with 2 decimal places or 1 decimal place with same setup (ALMOST FIXED) Image 2 Screenshot 41

    Please let us know I have missed something here.

    Thanks!

  • AA_C
    Replied on May 17, 2016 at 9:56 AM

    Hello,

    Yes as you can see it is showing the correct decimal places, this is because of a previous fix for another issue resolved by Ben, so that it shows the user the proper value in French with the comma in place of the decimal point for cents and the dollar sign after the amount.

    Comma for Decimal

    As I said above;

    This may be a mute point now as Ben's solution hides this from the end user, .... it just bugs me.

    The PayPal box, that is now invisible to the user is where the issue lies. If you look at the values in that field you will see what I mean. You will have to remove the css code that hides it.

    Again not a big issue now as the other field displays it correctly it's just why is it working on the English version and not the French, I'm missing something.

    Not a high priority so don't spend a needless amount of time on it please. I'm just trying to understand where I went wrong for the next time.

    I hope this clears up the understanding of the issue.

    Many thanks to all,

    Robert

     

  • Welvin Support Team Lead
    Replied on May 17, 2016 at 12:35 PM

    I'll be checking this and will ask my colleagues too. We'll let you know once we find the cause.

  • AA_C
    Replied on June 11, 2016 at 5:10 PM

    Hi, any further developments?....Robert

  • liyam
    Replied on June 11, 2016 at 10:15 PM

    We apologize for this delay. Let me forward this inquiry with Welvin and see if he found the cause.

    Thanks for your patience. 

  • Welvin Support Team Lead
    Replied on June 18, 2016 at 5:30 AM

    Please check this form: https://form.jotform.com/61692212810954. You can clone this back to check how I calculated the fields. There are five calculations in the form just to get the decimal point to work :) I tried a few options but this is best that I came up with. 

    I hope this works for you and my apologies for waiting a month.