Have a condition that resets a text box to 0

  • bkbarnes
    Asked on July 15, 2016 at 7:33 PM

    I have a form that uses calculations to add up selected products. I have the name of the product as a check box, and all the available sizes listed under it in text boxes. Their is a condition that keeps the sizes hidden if the check box is not checked.

    I have a lengthy form calculation set up to multiply the number input into each field by the price of that product. This works great, but I want to have a condition that resets each text box to 0 if the product checkbox is unchecked.

     

    This is a shot of the products before anything is selected:

    Have a condition that resets a text box to 0 Image 1 Screenshot 40

     Here is one with "Coffee Mugs" selected with a quantity of 2:

    Have a condition that resets a text box to 0 Image 2 Screenshot 51

    If the person filling out the form decides that they don't want whatever product they selected, I want them to be able to just deselect the product. The problem is, if they deselect it, the fields under it become hidden again, but they keep whatever value was entered into them, so the products $ and total field aren't reset. Here is a screenshot of the deselected product, but the balance due remains the same:

    Have a condition that resets a text box to 0 Image 3 Screenshot 62

     

  • jonathan
    Replied on July 15, 2016 at 11:21 PM

    I think you have fixed this on your form https://www.jotformpro.com/form/61957856094976

    When I test it, I see the Total resetting to zero(0) once the item was unchecked again.

    Here is the screencast video of my test.

    Have a condition that resets a text box to 0 Image 1 Screenshot 20

    Please let us know if still not resolve.