Form Calculator to achieve conditional logic

  • kentzo
    Asked on August 10, 2019 at 5:59 AM

    Can i achieve logic like this, if a field is 10, i will update another field to be 1. Basically what i want to achieve is to free customer 1 item for every 10 items they purchase. Buy every 10 item free 1 item.

    Free item = ( x Modulus 10), where X is number of item customer purchased.

    10 MOD 10 = 1

    15 MOD 10 = 1

    20 MOD 10 = 2

  • Girish JotForm Support
    Replied on August 10, 2019 at 7:40 AM

    You can use the Update/Calculate condition to show the Free item quantity based on the total quantity value.

    15654370361008 9 Screenshot 10

    Here is a sample condition:

    15654370641008 10 Screenshot 21

    Similarly, you can create conditions for values greater than 20, 30, etc. Here is how the form will look:

    1565437124screencast1008 1 Screenshot 32

    Hope this satisfies your requirement. If not, let us know and we'll be happy to provide any further assistance.