Is it possible to limit the number of selections from different classes?

  • Profile Image
    SBVA
    Asked on September 15, 2019 at 12:05 AM

    I would like to simulate the following scenario. I am hoping this feature of passing data from one form to another might help. Please advise..

    Scenario:

    1. In a college, there are 5 different courses offered (let us say Class1, Class2, Class3, Class4 and Class5).

    2. Each class has different seating capacity. E.g. Class1-60 students(max), Class2-30 Students(max) and so on..

    3. A given student can pick only one class to attend. But while he is registering for himself as a primary student, he can also register secondary student for a different class or same class for his/her spouse. That means the Form can accept one student (primary) OR two different students (primary and spouse).

    4. So in order to maintain the Capacity of the class, the form should give an error message if the student has selected a class which is already full (based on capacity set).

    What I tried and failed:

    First, I checked if reading the "capacity" data from an external source such as Excel Sheet - but apparently this is not possible in Jotform.

    Then I tried using different widgets such as Gift Registry, Inventory etc. but they do not work for me because of the requirement #3 mentioned above. Because if the primary and secondary students select same class, I cannot decrement a single class inventory

    What I would like to explore"

    Maintain the Gift Registry in a different form (say CapacityForm);

    As soon as Registration Form opens it should get the data from CapacityForm

    Upon Submission of Registration Form, it should pass data to Capacity Form so that appropriate class inventory is decremented.

    Is this possible?



    This is a re-post of a comment on How to Automatically Pass Form Data to Another Form

  • Profile Image
    roneet
    Answered on September 15, 2019 at 03:11 AM

    You can use the Quantity Gift Registry option where a user could select multiple students from the inventory:

    https://widgets.jotform.com/widget/quantity_gift_registry

    Let us know if this widget was helpful in your requirements.

    Thanks.

  • Profile Image
    SBVA
    Answered on September 15, 2019 at 08:41 AM

    I tried Quantity Gift Registry as well.  But that too is not an elegant solution for me.  You can see my form https://form.jotform.com/91533619173156

    In this form, the primary student will enter his/her choice of Level (1 thru 5).  Then he may choose to add Spouse (checkbox) where the Spouse will have similar choices, where choice of Level (1 thru 5) can be selected. 

    Therefore, as you can see if I use Quantity Gift Register, I will have to change the design where the user must enter # of students for a given level but then it gets confusing who is attending 1:30 class, vs. 3:00 class and so on... I feel the design would not be elegant...

    That said, I wanted to ask if it is possible to have the Quantity Gift Register widget as a hidden element and I can set the Quantity in the background?  I also need to know if I can read the available quantity as a variable?

  • Profile Image
    Kiran
    Answered on September 15, 2019 at 09:56 AM

    Unfortunately, it is not possible to set the value by using conditions to a hidden Quantity Gift registry widget. However, I think Inventory widget might help in achieving your requirement to some extent. I have tried cloning your JotForm to my account and tried with the inventory widget(s) to the form. Based on the number of selections i.e., Primary, Spouse and Children count we may set the condition to match the selections.

    However, since there may be different levels for the students the selections from the widgets have also to be done manually. Please see the cloned form of your form added with inventory widgets and conditions. Please check and let me know if that works for you.

    https://form.jotform.com/92573854873977

    Please get back to us if you need any further assistance. We will be happy to help. 

  • Profile Image
    SBVA
    Answered on September 26, 2019 at 11:14 AM

    Thanks for trying.  I looked at the cloned form but that really does not work for me.  I am hoping to find ways to minimize the confusion for the user.  So asking them to select the level and time slot in two different questions, and also asking them to enter a number in the Inventory registry is kind of confusing...

    I only wish that, Jotform had made such great forms design then why can't it also have a simple capability to read the data (dynamically) from an external source (such as Google sheet, or Excel Sheet etc.).  Or at least it can have an internal table where form designers can store configurable data fields.


  • Profile Image
    Kiran
    Answered on September 26, 2019 at 11:29 AM

    why can't it also have a simple capability to read the data (dynamically) from an external source (such as Google sheet, or Excel Sheet etc.)

    Though I am not sure how you want to achieve your requirement using an external source, we have Spreadsheet to Form widget that allows to fill the form fields from the uploaded Excel spreadsheet. 

    https://www.jotform.com/help/442-How-to-Use-the-Spreadsheet-to-Form-Widget

    Unfortunately, we do not have an alternate workaround to the issue with the reading quantity directly to the widget.

    Please get back to us if you need any further assistance. We will be happy to help. 

  • Profile Image
    SBVA
    Answered on September 26, 2019 at 02:23 PM

    So, I have already been looking at the Spreadsheet to Form widget and it might help, if only I can figure out how to provide a default value to the input field of Access Code. 

    For example if my external spread sheet looks as follows (where I only have a single data row, but multiple columns).


    Level Cap 1-1 Cap 1-2 Cap 2-1 Cap 2-2 Cap 3-1 Cap 4-1 Cap 5-1
    ALL 60 30 30 30 30 30 30

    In the table above the Unique Access Code = "ALL", and the other fields are capacities for various levels.  example Cap 1-1 is capacity for Level 1 for 1:30PM session, Cap 1-2 is capacity for Level 1 at 3:00PM session and so on..

    What I am exploring is that if I can simply hide the Spreadsheet to Form Widget and make it pull the default row without user entering "ALL" and pressing Auto Complete Fields button, the I can achieve what I need. Is there a way to make it happen using the custom css? (i.e. providing default value and make it pull?)

  • Profile Image
    Mike_G
    Answered on September 26, 2019 at 02:55 PM

    I would like to apologize for any inconvenience. I'm afraid it is not possible to automatically fill in the Spreadsheet to Form widget with an access code as soon as the form is loaded. Entering an access code and clicking the AutoComplete Fields button can only be done manually.

    As for your concern, would redirecting the respondent to the same form to submit another registration for the (secondary) spouse would work for you? So if the student (primary) would like to register a (secondary) spouse, then he will have to submit the form twice. The second submission would be right after the student (primary) submitted his/her registration.