My conditions aren't working?

  • murphyholt
    Asked on August 10, 2018 at 3:05 PM

    All of a sudden, none of my conditions are working. When a user signs up for the tour, they select the total number of guests (including themself). Then, depending on the number they enter, fields pop up that require them to enter the names of their guests. So, if a family of 5 signs up, 4 field appear where the guests names can be added. That conditioning no longer works; it shows varying numbers of fields. I checked my conditions and nothing changed from before...

  • Victoria_K
    Replied on August 10, 2018 at 4:14 PM

    Hello,

    I have checked your form and can see that you have several conditional statements to hide the same field. Please note that the field will be only hidden if the condition to hide it is met. This way if it is not met, the field should be always shown:

    1533931751screenshothylkg Screenshot 10

    I can suggest to combine if statements to hide or show the needed fields. For example:

    1533931796screenshotf0v1d Screenshot 21

    Also, I can see that you have Calculate Total for the widgets set to NO:

    1533931950screenshottu1q4 Screenshot 32

    This setting send not a number of seats selected, but a full string like 3:00PM[2], so you should also check the substring widget to cut of the 3:00PM from the string and check the value left in conditions.

    Please let us know if you need more help.

  • murphyholt
    Replied on August 13, 2018 at 9:32 AM

    How do I "check the substring widget to cut of the 3:00PM from the string and check the value left in conditions"? I think that's the only thing I need to make it work.

  • David JotForm Support Manager
    Replied on August 13, 2018 at 11:26 AM

    Please do the following:

    1) Delete your conditions you have created for the "Family member" fields.

    2) Enable the Calculation Total:

    1534172149calculatetotal Screenshot 10

    3) Add a Form Calculation widget below each "Quantity Gift Registry" widget, in order to get the total quantity selected: https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget 

    1534172477formcalcualtionwidget Screenshot 21

    4) Then create conditions to show each of the "Family members", example:

    1534173399conditions Screenshot 32

    1534173416conditions 001 Screenshot 43

    1534173428conditions 002 Screenshot 54

    1534173441conditions 003 Screenshot 65

    Here is the result: https://form.jotform.com/82244519738969 

    1534173714result Screenshot 76

    As you can see, if the users select 4, then 3 "family member" fields would show, because the user who is filling the form is already included, and his information has already been capture in the first page.

    You can clone my form if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL