What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Conditions don't work as entered

    Asked by TJCApaches on April 16, 2013 at 12:24 PM

    This form lets you pick the number of players you would like to register (or a team of 6), and let's you enter in their information. I just have conditional statements set up for 1, 2, and 3 players, and when you pick 1, that's correct - it shows the fields for player 1. However, when you pick 2, it's supposed to show player 1 and player 2, but it only shows player 2. Same with 3 - it's supposed to show players 1-3, but it only shows 3.

    Order of the conditions in JotForm - tried 1, 2, 3...right now it's 3, 2, 1.

    If I delete the conditions for 1 player, then when I select 2 players, players 1 and 2 show up, but when I select 3, just player 3 shows up.

    Any ideas?

    Page URL:
    http://form.jotformpro.com/form/20806551452954

    JotForm select register
  • Profile Image

    Answered by glennlee on April 16, 2013 at 01:09 PM

    Hi,

    I cloned your form and I also replicate the same issue. I think there is conflict between the condition to one another condition. If you can use check box to add another player field. Please see this cloned form. If you can use this cloned form, feel free to clone it.

    Here is the guide on how to clone a form.

     

    Thanks!

  • Profile Image

    Answered by pinoytech on April 16, 2013 at 01:24 PM

    Hi TJCApaches,

    Actually, you can achieve that in your form. Please take a look at this cloned form of yours if I did it correctly or not.

    http://www.jotformpro.com/form/31054785729967

    If you need further assistance, do let us know.

    Thank you!

  • Profile Image

    Answered by TJCApaches on April 16, 2013 at 02:14 PM

    Thanks to you both!

  • Profile Image

    Answered by pinoytech on April 16, 2013 at 02:16 PM

    It's my pleasure TJCApaches! Is there anything we can help you with?

  • Profile Image

    Answered by TJCApaches on April 16, 2013 at 03:46 PM

    Been tweaking the form and just keep having to go back to the original. I'm stubborn so I'm going to keep trying :)

    On your form, everything works good, but if you select a number of people on the individual, then go to team, and go back to individual, the drop down doesn't reset, so the boxes for the players never show up. Also, when I try to add a condition to remove the Team Captain option under the Player 1 fields when you pick "Team", going back to Individual from Team doesn't remove the Team Captain.

    Some of this stuff I can fix as I have to take the source code and add some HTML/jQuery to it so it integrates with our credit card processing system, but I've never had this much trouble with the condition statements.

    I feel like the order of the conditions affects how the conditions are executed, but there's no way to change the order. Sometimes when I change the conditions it changes the order, but sometimes it doesn't. Adding new conditions doesn't always add them to the bottom too.

    I'm going to try to just take out the radio buttons and just use the drop down box, see if that messes with it.

  • Profile Image
    JotForm Support

    Answered by Mike_T on April 16, 2013 at 04:22 PM

    On your form, everything works good, but if you select a number of people on the individual, then go to team, and go back to individual, the drop down doesn't reset, so the boxes for the players never show up.

    We do not clear values of hidden fields to not lose any data, so this is acting like this.

    Also, when I try to add a condition to remove the Team Captain option under the Player 1 fields when you pick "Team", going back to Individual from Team doesn't remove the Team Captain.

    Can we remove that "Team Captain" option from the form, if it is not used on both Individual and Team registrations?

    I feel like the order of the conditions affects how the conditions are executed, but there's no way to change the order. Sometimes when I change the conditions it changes the order, but sometimes it doesn't. Adding new conditions doesn't always add them to the bottom too.

    Your are right, this can be confusing. Condition's order depends on the order of field that is used in first conditional rule.

    For example, it is possible to use hidden fields in your conditions to set some custom order.

    On the following screenshot, mentioned condition will be placed on the top of the list, due to order of 'Condition 1' hidden field (since this field is first on the form and it is first in conditional rule).

    The next condition will be placed as second on the Saved Conditions list.

    Please let us know if you need any further help on this. Thank you.

  • Profile Image

    Answered by TJCApaches on April 16, 2013 at 04:33 PM

    Gotcha.

    I ended up taking off the radio buttons.

    http://form.jotformpro.com/form/31056408149957

    I now have 2 different conditional statements for if 6 players is selected - one that's if players = 6, and the another that shows up last if players != 1-5. That solved my team captain problem.

    Thanks so much for looking into this!

  • Profile Image
    JotForm Support

    Answered by Mike_T on April 16, 2013 at 04:43 PM

    Great solution with the Drop Down field. We are happy to know that your form is working fine now :)