How can I count answers in an Input Table?

  • speeddemon
    Asked on October 16, 2018 at 11:37 AM

    I have two input tables in my form.

    I want to count the number of cells that have an answer.  I have tried doing it as a calculation, but the form is automatically assigning a value to the answers in the dropdown fields.  I just want to know how many cells have been answered.  Thanks!

  • BJoanna
    Replied on October 16, 2018 at 2:05 PM

    Unfortunately, it is not possible to assign calculation values to a dropdown field of the Input table. So, it is not possible to perform a calculation with the Input Table field when using dropdown field as an Input Type. Calculation values can be assigned only to radio button and checkbox fields in the Input Table. 

    How to Perform Form Calculation in the Matrix Field?

  • speeddemon
    Replied on October 16, 2018 at 2:11 PM

    Ok.  I want to have people register for an event.  For each game they have two choices.  How can I count how many games they enter?  It needs to be in a grid or table of some kind, because there's a lot of games, and they can enter up to 5 dogs in each game.  How can I do that?

  • Mike_G JotForm Support
    Replied on October 16, 2018 at 4:20 PM

    I have checked your form and I see that each drop-down in the table cells has 2 options — "Level 1" and "Level 2". I can only think of one workaround that would meet your requirements. However, this would mean that we need to change the "Level 1" to "Level One" and "Level 2" to "Level Two". If that is okay with you, then, I think I may have a solution. Also, I may still need to test this workaround and I will be needing time. I'll get back to you as soon as I have the solution.

  • Mike_G JotForm Support
    Replied on October 17, 2018 at 6:50 PM

    I would like to apologize for any inconvenience, the workaround that I thought would work may not really work for you since the options in the drop-down would appear like this "Level One 1" and "Level Two 1". There is a number "1" at the end of each option that will represent the option's value and will be counted either using conditions into another field or using the Form Calculation widget. I tried to eliminate the "1" off using CSS codes with no luck.

    Sample Form: https://form.jotform.com/82897002567970

    I understand that this will just cause confusion to you respondents if you decide to go with this workaround.

    I have another workaround, but it will require at least 45 additional fields in your form and several more conditions. I'll work on it again and get back to you as soon as possible.

  • speeddemon
    Replied on October 18, 2018 at 10:20 AM

    Wow, 45 fields is a lot!  But I really need to get this working!  I need to release this form today, and then I need to clone it for two additional events with the same options.  Thank you for your help!

  • Mike_G JotForm Support
    Replied on October 18, 2018 at 6:53 PM

    I just realized that having 45 fields or more and several more conditions added to your form would be tedious. Also, you have 2 Input Table field where we would need to apply that workaround. We can have that as our last resort, but I would like to propose another solution.

    I have checked your form and I see that you have managed to change the drop-down options in the table from "Level 1" to "Level One" and "Level 2" to "Level Two".

    As for the workaround, you need to change the options again, this time from "Level One" to "Leve1 One" and "Level Two" to "Leve1 Two". (I have highlighted the difference)

    The calculation value set on the table will no longer be necessary.

    After that, inject the following CSS codes to your form. — How-to-Inject-Custom-CSS-Codes

    select option, select {

        font-family: "Goudy Sans Medium" !important;

    }

    1539903059t18 50 21 Screenshot 10

    I have searched for a font online that would somehow have the lowercase "l" and number "1" look the same. I have checked and it works in most browsers (Microsoft Edge, Google Chrome, Mozilla Firefox, Internet Explorer 11). Just a little obvious with Safari, but I think it's acceptable. 

    Here's the link to the clone version of the form where I have applied the changes — https://form.jotform.com/82907165567972

    1539902915t18 43 47 Screenshot 21

    Filling all the dropdowns on the 2 Input Table fields would result in a total of 90 number of games entered.

    I hope this helps. If you have other questions or concerns, please feel free to let us know.

  • Mike_G JotForm Support
    Replied on October 18, 2018 at 6:57 PM

    I forgot to mention that you need to make sure that all the cells in both Input Tables are included in this condition.

    1539903449t18 56 44 Screenshot 10

  • speeddemon
    Replied on October 18, 2018 at 8:41 PM

    Thank you very much for your help!! I've got it working now.  Thanks!