How can I let a registrant add a friend, and still limit the number of entries?

  • cswdvt
    Asked on April 19, 2018 at 8:12 AM

    Hi,

    I submitted a ticket about 6 weeks ago about this issue: 

    I have a signup form for a workshop that is limited to 20 people. The person filling out the form can sign up a friend using the same form. Normally, limiting the entries is done by form submissions. But if someone signs up a friend, then the limit should be reduced by 2 people. I can't quite figure out how to get this to happen.

    After submitting that ticket, I received this reply:

    You can use Inventory Widget to select the number of people that will be attending and how many are left

    You can then add a Show/Hide condition that will Hide the Submit button if there are no more available entries based on the Inventory Widget you added.

    1524139499jotform condition Screenshot 10

    The Inventory Widget works. However, setting up the conditional (to Hide the Submit button) isn't working correctly.

    If "Number of People Attending is empty" is triggered if no value is selected by the user; not when there are no more spots left in inventory. So as soon as the form loads (while the field is still empty), the button is hidden. As soon as the user selects a number (1 or 2), the submit button appears again.

    I've tried other iterations, too:

    If Number of People Attending is Filled

    If Number of People Attending is Equal to 20 (the limit)

    etc.

    All of them apparently are triggered by the value of the field; not the amount of inventory left.

    Ultimately, I don't just want to hide the Submit button. I want to hide all of the form fields, and show a message indicating that signups are full.

    Can you help? What's the correct setting?

    Thanks,

    Jonny


  • David JotForm Support
    Replied on April 19, 2018 at 11:38 AM

    Conditions cannot be triggered based on how much inventory is left.  The conditions would need to be set based on the quantity selected, as you have already seen.  My recommendation would be to include hiding the submit button and showing your form closed message when no quantity is selected but reword the message to say something like "If there is no quantity remaining, the event is full".  If there are 19 remaining in the inventory and the user selects 20, it will count the field as empty.  If there is no quantity remaining, the user cannot even make a selection and it will always interpret the field has empty.