How to populate textbox using conditions on input table field

  • Worksite
    Asked on February 13, 2019 at 6:03 PM
    When an input table has more than 2 options to select, how do you make the calculation populate a text box below based on one of those answers? 

    For instance this form: https://form.jotform.com/82406583578972 it has 3 choices. Satisfactory, Unsatisfactory, and N/A.

    We are trying to make it so if they select unsatisfactory, they are forced to explain why in a text box below.


    Do I have to just change my calculation? Or is it a different condition?

  • jherwin
    Replied on February 13, 2019 at 9:58 PM

    The only workaround for this is to set unique calculation values for each option. You can use Satisfactory1, Unsatisfactory1, and N/A1 for the first row, then Satisfactory2, Unsatisfactory2, and N/A2 for the 2nd row and so on.
    1550113030calcvalues Screenshot 10

    And then add a form calculation to get the calculation value you set in your input table.
    1550113086formcalc Screenshot 21

    Demo form: https://form.jotform.com/90438752192966

    Give it a try and let us know if this meets your needs.

  • Worksite
    Replied on March 28, 2019 at 2:22 PM

    Hi guys,

    Stuck on this again. Here is the form I'm working off of. https://form.jotform.com/82406663678972

    I'm running into errors when we get to double digit numbers. It's populating the data for #1 if I select "deficiency found" for number 10. Obviously capturing the 1 instead of both digits. Is there a workaround here? 

    Thanks in advance. 

  • Kevin Support Team Lead
    Replied on March 28, 2019 at 5:01 PM

    Are you referring to the following selection? 

    1553806339screenshot 01 Screenshot 10

    If so, I have checked your form and noticed you have only show/hide conditions, the one related to that selection is showing two fields: 

    1553806490screenshot 01 Screenshot 21

    And this is how it works while filling out the form: 

    1553806570screenshot 02 Screenshot 32

    May you please confirm if this is what you were referring to? 

    If not, please kindly provide us more details about the issue and let us know the labels of the involved fields, you may also upload images to this forum thread, this guide will help you doing so: How to Post Screenshots to Our Support Forum 

    We will wait for your response. 

  • Worksite
    Replied on March 28, 2019 at 5:09 PM

    Hey there,


    So if "Inspected (Deficiency/Haz Found)" for is selected for "WHMIS and SDS", currently the "Windows, Floors, Doors & Stairs" input table as well as "WHMIS and SDS" input tables populate which is wrong. 


    So for further explanation. If someone selected "Inspected (Deficiency/Haz Found)", we want the corresponding single row input table and question to populate below to force them to describe what exactly is deficient. I.e. if someone says there's a hazard identified with "Work Surfaces", then they are now required to explain what the hazard is, etc. because it populates below.


    However, I can't seem to make them match up. Where I'm running into issues is the double digits. #11 "WHMIS and SDS" populates "Windows, Floors, Doors & Stairs" because it contains a 1 in the condition. But it is supposed to be #11. 


    Hopefully that clarifies?

  • jherwin
    Replied on March 28, 2019 at 6:52 PM

    The fields for WHMIS and SDS do not show because you have no conditions for that. I made the correct condition to show the said fields and it's working fine now.

    See my demo form here: https://form.jotform.com/90867482915975
    1553813362correct Screenshot 10

    What I suggest if you will troubleshoot the condition is to make the form calculation not hidden since the hide/show condition relies there. This way, you'll see if you put the wrong or correct value to trigger the condition you want.

  • Worksite
    Replied on March 29, 2019 at 11:41 AM

    Oh gosh - thank you! 

    What a silly error. Appreciate your help! 

  • Worksite
    Replied on March 29, 2019 at 11:52 AM

    Ah - I spoke too soon! So the issue is still happening. When I select there is a hazard for WHMIS and SDS, Windows, Doors, Floors & Stairs is still populating even though I haven't selected anything for that. See screenshots. 

    1553874693Screen Shot 2019 03 29 at 9 Screenshot 10

    1553874704Screen Shot 2019 03 29 at 9 Screenshot 21

  • Alan_D
    Replied on March 29, 2019 at 2:41 PM

    This is a situation related to the creation of conditions. We use the "Contains" condition. And the following two cases fulfill the condition.
    How to populate textbox using conditions on input table field Image 10That is why we are seeing two comment field.
    We need to make the values fully unique. For this, it is enough to put a dot in front of the numbers after 10. You can edit these conditions in a text editor.
    How to populate textbox using conditions on input table field Image 21
    Remember to update all conditions after editing.
    How to populate textbox using conditions on input table field Image 32How to populate textbox using conditions on input table field Image 43This is how it looks:
    How to populate textbox using conditions on input table field Image 54
    How to populate textbox using conditions on input table field Image 65