Using input table to drive conditional logic

  • Profile Image
    camillafisco
    Asked on February 13, 2018 at 07:19 AM

    Hi, i would like to use input table values to drive conditional logic in the form. If the user selects a radio button in input table, i would like to show a preset option. Is this possible with input table?

    If not what controls can i use to setup multiple conditions in one card?

    Thanks.

  • Profile Image
    Kevin_G
    Answered on February 13, 2018 at 09:10 AM

    You may trigger conditions based on the selected option in the column:

    15185307461.png

    This is the only way to trigger conditions, other multiple entries widgets will not trigger conditions either. 

    An alternative would be to capture the value from the desired element in the Input Table with a form calculation widget, then if the widget is filled would mean that the option was selected and you can trigger the condition based on the calculation widget. 

    These guides will help you with that: 

    https://www.jotform.com/help/343-How-to-Perform-Form-Calculation-in-the-Matrix-Field 

    https://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic 

    I hope this helps. 

  • Profile Image
    Michael
    Answered on February 13, 2018 at 02:46 PM

    Kevin, can you clarify the first part of your answer?

    ..This is the only way to trigger conditions, other multiple entries widgets will not trigger conditions either...

    How do you access the values of the input table in the conditions editor?

    The only option is the check the value of the whole input table, not particular column values. 

    So how can a column value be used to evaluate a condition that results in another form element to be visible?

  • Profile Image
    aubreybourke
    Answered on February 13, 2018 at 03:30 PM
  • Profile Image
    mgalkovsky
    Answered on February 13, 2018 at 05:42 PM

    I tried it on this form, but it seems that condition - contains for A1, A2, A3, B1, B2, B3 are not enrolled.

    https://eu.jotform.com/build/80436440660351#preview


    The condition built on calculated field that includes A1,A2, A3 or A1, B2, C2

    https://form.jotformeu.com/80436440660351

    https://form.jotformeu.com/80436440660351

    https://form.jotformeu.com/80436440660351

  • Profile Image
    Kevin_G
    Answered on February 13, 2018 at 06:57 PM

    I have reviewed your form and the the conditions indeed work as expected, but I can see you're handling some "Heading" elements based on conditions, I can see that in some cases the heading element will end up as the last form page, please note that this will not work since such elements cannot be displayed at the end of the form, you will need to replace such elements with a "Text" element instead. 

    To explain better what I'm referring to, here are some screen-cast and screenshots about the conditions triggered on each case. 

    1. - Condition, "Assumption" is a heading element and would end up as the last page of the form: 

    15185660511.png

    - Result: 

    15185660911.gif

    2. - Condition, since it's not a heading element it works fine: 

    15185661222.png

    - Result: 

    15185661632.gif

    3. Now, if the conditions shown above are met at the same time, they will be properly triggered: 

    15185662153.gif

    Your form is basically working as expected and conditions are triggering fine, you would only need to replace the current heading elements with texts, the text element can be found on the "Add form element" button. 

    I hope this helps.