How to split total amount and verify sum

  • olivierarthus
    Asked on February 19, 2021 at 4:11 AM

    Hello
    My user enters a value in a field, at the beginning of the form: let's say 100 sqm

    Then later I ask a yes/no question. If answer is Yes, then I want to ask him for a split

    Then I wan him to split value:
    1°) 60 sqm with high ceilings
    2°) 40 sqm with low ceilings.
    and force the total to be 100 (once a value is entered in any of the 2 fields)

    Is there a way of achieving something similar?

    Thanks

  • Lorenz JotForm Support
    Replied on February 19, 2021 at 6:15 AM

    Hi there,

    Please allow me some time to work on this to see if I'll be able to come up with a workaround.

    I'll be back shortly.

  • Lorenz JotForm Support
    Replied on February 19, 2021 at 6:29 AM

    You will need to create a calculate condition, wherein if either of those split fields is filled, it will deduct its value to the first value entered(100sqm) and populate the other field with the difference.

    1613733991 602fa067b9f8b The Easiest Onl Screenshot 10

    Related guide: https://www.jotform.com/help/268-how-to-insert-text-or-calculation-into-a-field-using-conditional-logic

    Here's a sample form I created: https://form.jotform.com/210492996804061

    Kindly check to see if it meets your requirement.

    Let us know if you need any further assistance.



  • olivierarthus
    Replied on February 19, 2021 at 10:21 AM

    Hello

    I tried using your example, but it does not allow me to enter anything in input 1 or 2, so i cannot confirm it does the job, sorry

  • Richie JotForm Support
    Replied on February 19, 2021 at 12:50 PM

    It seems my colleagues calculation is correct however, he is automatically getting the values of the input that is why you cannot enter values to 1 and 2.

    I have enhanced his condition and added the split question yes/no.

    1613756965 602ffa2581df2 GIF 20 02 2021 Screenshot 10

    Sample form:https://form.jotform.com/210495549450964

    You may clone my form to check the condition used.

    Guide:https://www.jotform.com/help/42-how-to-clone-an-existing-form-from-a-url

  • olivierarthus
    Replied on February 20, 2021 at 4:01 AM

    Hello

    Just tested quickly, it seems to be doing the job, but I need to test further to understand if it really does in my context, thanks