How to use hidden values for input data in the form

  • KPWM
    Asked on December 19, 2016 at 6:47 PM

    Hello, 

     

    I've had success with hiding my values using the <span> code in the columns section of the questions I've written for surveys. However, this past week the code does not seem to be working and it's no longer hidden on the live form that I distribute. I'm attaching the screen shot of the code I put in on the back end. I can't figure out what happened - I didn't even go in and change anything. This problem is occurring on all the forms which have this <span> code in it. What can I do to make it hidden again? 

    Thank you! 

     

    Jotform Thread 1015531 Screenshot
  • Ian
    Replied on December 20, 2016 at 12:16 AM

    Yes I could replicate the issue and I am discussing it with fellow team members to find the cause of the issue.

    In the mean time please let us know what purpose is the hidden text serving so we can think of a workaround for the situation

  • KPWM
    Replied on December 20, 2016 at 3:22 PM

    Thank you for looking into this Ian.

    I download the excel and delete the wordings, leaving only the number which is associated to the answer for each question. The hidden number allows me to assign a value to each question so I can do data analysis.

    I'm not sure if there is a more efficient way of doing this, if so, please let me know. This is what I came up with.

  • jonathan
    Replied on December 20, 2016 at 6:17 PM

    I checked your form https://form.jotform.com/62245870363154 and I see the issue you refer to on the column headers label of the Matrix tables on the form.

    How to use hidden values for input data in the form Image 1 Screenshot 30

    What you did on the matrix column header is incorrect. You should not use html tags into the label names of fields. 

    Ex:

    How to use hidden values for input data in the form Image 2 Screenshot 41

    this method will also cause problem in the submission data of the form because the html tags/codes will interfere on the field label names used in the submission data.

    Please remove those span html tags you used on the column header of the matrix table field to avoid complication on the submission result of the form.

    ---

    Can you describe more what you were trying to achieve.

    I understand that you wanted to have a a hidden number prefixed to each of the column header of the matrix table.

    Ex: 0: Header1 1: Header 2 2: Header 3  so on....

    but I do not understand yet how you meant to use those hidden numbers in your data analysis. For one those label names are just static text and were not input values, so it is not possible to use them as input data on the form.

    We will wait for your explanation and further details.

    Thank you.

     

     

     

     

  • KPWM
    Replied on December 23, 2016 at 3:09 PM

    Thank you for the explanation. 

    Essentially, what I'm trying to do is add a number value to each of my responses. I want these values to only be seen in the downloaded excel from the back end. These numbers should not been see by the person filling out the form. 

     

    For Example:

    Questions #1 says: 1. In general, would you say your health is: 

    I'd like for an answer of Excellent to be 1, Very good to be 2, Fair to be 3, and Poor to be 4. I used codes so it would show up on the excel in the back end, which seemed to work until I've ran into this issue that's exposing everything. 

     

     

  • Mike_G JotForm Support
    Replied on December 23, 2016 at 5:27 PM

    To my understanding here's what you would like to appear in your excel sheet. (Please see image below).

    How to use hidden values for input data in the form Image 1 Screenshot 40

     

    Since using an extra <span> HTML tag won't work, I suggest we use CSS codes as a workaround. 

    I understand that you would like to have the data input in your excel sheets to appear as "1: Excellent", "2: Very Good", "3: Good", "4: Fair", or "5: Poor". 

    So we will make those the actual headers of your matrix table as shown in the image below.

    How to use hidden values for input data in the form Image 2 Screenshot 51

    Then, we will try to use the CSS codes below to change that into only "Excellent", "Very Good", "Good", "Fair", and "Poor" respectively since that's what you want to only show on the form.

    #cid_170 th.form-matrix-column-headers.form-matrix-column_0, #cid_170 th.form-matrix-column-headers.form-matrix-column_1, #cid_170 th.form-matrix-column-headers.form-matrix-column_2, #cid_170 th.form-matrix-column-headers.form-matrix-column_3, #cid_170 th.form-matrix-column-headers.form-matrix-column_4 {

        width: 65px !important;

        height: 25px !important;

        padding: 0px !important;

        color: #ddd !important;

    }

    #cid_170 th.form-matrix-column-headers.form-matrix-column_0:before {

        content: "Excellent" !important;

        text-align: center !important;

        height: 25px !important;

        color: #444 !important;

        position: relative !important;

        left: 6px !important;

        top: 6px !important;

    }

    #cid_170 th.form-matrix-column-headers.form-matrix-column_1:before {

        content: "Very Good" !important;

        text-align: center !important;

        height: 25px !important;

        color: #444 !important;

        position: relative !important;

        left: 6px !important;

        top: 6px !important;

    }

    #cid_170 th.form-matrix-column-headers.form-matrix-column_2:before {

        content: "Good" !important;

        text-align: center !important;

        height: 25px !important;

        color: #444 !important;

        position: relative !important;

        left: 6px !important;

        top: 6px !important;

    }

    #cid_170 th.form-matrix-column-headers.form-matrix-column_3:before {

        content: "Fair" !important;

        text-align: center !important;

        height: 25px !important;

        color: #444 !important;

        position: relative !important;

        left: 16px !important;

        top: 0px !important;

    }

    #cid_170 th.form-matrix-column-headers.form-matrix-column_4:before {

        content: "Poor" !important;

        text-align: center !important;

        height: 25px !important;

        color: #444 !important;

        position: relative !important;

        left: 19px !important;

    }

    Here's how it should look like after (Please see image below)

    How to use hidden values for input data in the form Image 3 Screenshot 62

    It may, however, complicate things a bit, since you will need to apply different CSS codes for each matrix in your form. 

    I hope this helps. If you need any further assistance, please feel free to contact us again anytime.

    Thank you.

  • KPWM
    Replied on December 23, 2016 at 8:15 PM

    I appreciate the guidance, but I feel this will take a lot of time to do. I have many surveys and many matrix's within them.

     

    Is there a more convenient way to assign number values to my survey responses? 

  • liyam
    Replied on December 23, 2016 at 11:48 PM

    Sadly, this is the most convenient way possible as of yet with assigning number values. But if in case we come up with better ideas, we'll inform you of it.

    Thanks.

  • KPWM
    Replied on December 27, 2016 at 1:33 PM

    Yes, please do. 

     

    Another question though. The values I've hidden with the SPAN code are now hidden again. Can I just keep using this code to hide values I've assigned? Am I running any major risk to losing the data I'm collecting if I do? 

     

    Was the unhiding and then rehiding those <span> values a system error that corrected itself? Wanting to know if there was something that was intentionally done on your end to rehide them for me.

  • Mike_G JotForm Support
    Replied on December 27, 2016 at 2:55 PM

    I have checked your form and I see that the values that were hidden using the <span> code workaround are not showing again. I'm not sure if there is something that was done for your form specifically since it's working even on newly created forms and this just probably corrected itself.

    Also, it will not affect any of your data if you continue using that method.

    Thank you.