Why hidden fields are not retaining values from matrix fields?

  • prolinksoftware
    Asked on December 14, 2016 at 1:35 PM

    Hi Support,

    I'm using calculated fields to report out of a matrix. They used to work but seem to have stopped working and are now returning zeros. It's very simple.

    1. I have a matrix with 5-1 and three sub fields.

    2. I add 3 hidden calculated fields, each one pulling the value from the sub fields.

    3. Everything was working until as late as 12/12 when a survey came in with the correct values for the sub fields.

    Now when I run it, the calculated fields return zeros across the board.

    In short, did you break something?

    Thanks.

    jason

    jbrigham@prolinksoftware.com

  • Kevin Support Team Lead
    Replied on December 14, 2016 at 3:04 PM

    I have checked your form and I can see what you're referring to; however, upon checking the form settings I can see hidden fields are being cleared as soon as the form is submitted. 

    Why hidden fields are not retaining values from matrix fields? Image 1 Screenshot 20

    What I would suggest you is to set this option to "Don't clear" this way you avoid the hidden fields to be sent empty. 

    Do let us know how it goes. 

  • prolinksoftware
    Replied on December 14, 2016 at 3:44 PM
    Hi Kevin_G,
    How did you get there? Here is what I'm seeing when I click Settings at
    the form level..
    I went back in and set it to use the ABC text string in your calculated
    form so it was returning "Very Positive" and those results for a while.
    This was per the little video I was sent. Then I think you changed
    something again because it's now returning numbers (1-5) as the text
    rather than the descriptions. Overall, this seems very unstable and
    buggy. It keeps flipping back and forth and I'm having to do a lot of
    coding to get around Jotform's inconsistencies.
    Please let me know.
    Thanks.
    Jason
    Jason Brigham
    Prolink Corporation
    jbrigham@prolinksoftware.com
    ...
  • Kevin Support Team Lead
    Replied on December 14, 2016 at 4:58 PM

    Jason, 

    I have not changed your form, I cloned it and changed that option on my end to get the form working and retaining the hidden field's values. 

    To change that setting to do not clear, please click on the preferences icon while in the form builder: 

    Why hidden fields are not retaining values from matrix fields? Image 1 Screenshot 40

    Once there go to the advanced tab and click on the show more button, scroll down a bit to find the option: 

    Why hidden fields are not retaining values from matrix fields? Image 2 Screenshot 51

    Once you change that setting then the hidden fields should not be cleared once the form is submitted, also, seems like the string option was sent while the calculation values failed or were missing, I have performed some tests on my end showing those hidden fields and it worked fine, please see the screenshot below: 

    Why hidden fields are not retaining values from matrix fields? Image 3 Screenshot 62

    I have also tested your form and noticed it works, calculation values are being copied instead of strings; however, if you notice this happens even when the calculation values have  been properly saved in your matrix field, please do let us know.

     

  • prolinksoftware
    Replied on December 14, 2016 at 5:44 PM
    Hey guys,
    I found the form level setting and changed it. Thanks.
    As for the values, I'm getting mixed results even though I didn't change
    the form.
    Here are results from a form I submitted during testing at around 1pm
    today. As you can see, the last three are zeros even though I filled in
    5, 5, 5 respectively on the form itself.
    Resolution|Yes
    Service|2
    Software|3
    Timeliness|0
    Expertise|0
    Courtesy|0
    Improve|nothing
    Not being able to get it to give me numbers, I switched it to names per
    your suggestion and filled out the form at 1:45. I got these results
    (which are correct).
    Resolution|No
    Service|3
    Software|3
    Timeliness|Somewhat Positive
    Expertise|Very Positive
    Courtesy|Somewhat Positive
    Improve|
    I figured I was all set and then a customer logged into the site at 2:15
    and submitted the form and I received these results:
    Resolution|Yes
    Service|5
    Software|4
    Timeliness|5
    Expertise|5
    Courtesy|5
    Improve|
    Woops.. back to numbers despite my having left the site after switching
    it to the names and making no changes to the calculated fields.
    So I'm not sure what I'm going to get, but I've coded my end to accept
    both numbers and names just in case it decides to flip back to my last
    preference of sending the names.
    Here is some more forensic evidence showing you have a bug. As you can
    see from the picture below, in my inbox is my submission from 1pm today.
    The checkmarks are all 5's, but the calculated fields (at that point not
    having been changed for two weeks) are no longer calculating anything
    and are set to zero.
    Anyway, perhaps changing that form setting will clear it all up. Only
    time will tell.
    Thanks.
    Jason
    Jason Brigham
    Prolink Corporation
    jbrigham@prolinksoftware.com
    ...
  • Kevin Support Team Lead
    Replied on December 14, 2016 at 7:07 PM

    I have checked your form again and I cannot replicate the problem, I can see indeed on the last tests the form worked fine. 

    Also, upon checking the Form Calculation widgets you're using (Timeliness, Expertise, Courtesy) and I can see you are currently adding the result as text, please set this as number this way you avoid inconveniences since the values you have set up in the matrix field settings are numbers: 

    Why hidden fields are not retaining values from matrix fields? Image 1 Screenshot 20

    This should also help you to get always the numeric value of the matriz selection. 

    On your submissions I can see those that you're mentioning where the calculation values were sent as 0, but I can also see there are multiple changes recently and as mentioned above the problem cannot be replicated on my end; however, if this still persists on your end, please let  us know.