Subtract from a number

  • zootitup.service
    Asked on June 12, 2021 at 6:35 AM

    Hi!

    I wanted to ask if this is possible. I have only 100 stocks. It will be reduced when someone order and it will be shown on my form too. So I have two parameters, stocks and reserved. Stocks will be reduced when someone uploaded their proof of payment on a certain field. Reserved will increased when someone do not pay. So they will know how many items they can buy.

    I am thinking using a database, but I don't know how to.

    Thanks!


    1623494107 60c48ddb4c3db  Screenshot 101623494116 60c48de4ea7fc  Screenshot 21

  • Billy JotForm Support
    Replied on June 12, 2021 at 6:57 AM

    Hi there,

    I hope you're doing well and thanks for reaching out.

    Instead of adding a static value in your form, take advantage of the stock control feature instead. It'll give you the flexibility of controlling the stock and the value is dynamic. It'll automatically deduct the number of items selected when your respondents submitted your form. You need longer need a condition to deduct 1 when someone uploaded their payment receipt which I believe is a tedious process. Please see the screencast below:

    1623495303 60c492874b6a2  Screenshot 10

    I am thinking using a database, but I don't know how to.

    Connecting an external database to your form is not support.

    Let us know if you have further inquiries.

    Best regards,

  • zootitup.service
    Replied on June 12, 2021 at 7:00 AM

    Hi, thank you for your response. The problem is that, the overall stock is only 100. The stocks is not limited on each designs and custom design wherein they will upload an image.

  • Billy JotForm Support
    Replied on June 12, 2021 at 7:59 AM

    I see. Have a look at the Inventory widget then. Please note that this widget requires your respondents to manually select the number of items they're going to order for it to work.