What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Pulling matrix fields for the email notification

    Asked by prolinksoftware on November 28, 2016 at 05:49 PM

    Hi there,

    I notice that you have the form fields for inclusion into a notification email, but I'm trying to parse the email responses programmatically. So the issue is that we have a matrix called {matrix} where someone fills out responses from Very Negative to Very Positive. Unfortunately when you embed {matrix} into your email notification, it comes through as an HTML table with green checkmarks.. cute for a human, but a pain for a computer.

    Within our matrix are 5 rows and 5 columns. I notice that there are sub-fields called #input_0_0 - #input_4_4, etc, but nowhere in the documentation does it say where I can use them.

    Can we refer to these directly to get the 1/0 flag out of them? Maybe in the curly braces? {matrix:#input_0_1}?

    Basically I would like to get readable text out of the email notification. Also, clearly the two numbers represent the row and column of the input, but there isn't any documentation that tells me which number refers to which. Therefore, is the first number representing the row or the column?

    Thanks.

    Jason

     

  • Profile Image
    JotForm Support

    Answered by BDAVID on November 28, 2016 at 07:43 PM

    This is not possible, however, you can get the values in separate fields, example:

    1) Add a Form Calculation widget and label it according to the option you want to capture:

    2) Click on its wand icon and obtain the option, example:

    3) Preview your form, and you will notice that it will obtain the value selected:

    Repeat the steps for the other options in the matrix field. In that way, you will be able to manage them in the notification:

    Also, you can hide all the Form Calculation widgets, so the user will only see the matrix:

    Let us know if you need more help, we will be glad to assist you.

  • Profile Image

    Answered by veshman on December 14, 2016 at 09:18 AM

    Hi, thank you for the explanation. I have a need to take this a step further and was wondering if there was an easier way to do this than what I came up with.

    My need is this:

    Instead of returning "very satisfied", I would want to return a specific code that is dependent on both the row and column.

    In the example seen in the screen shot, the if someone gets the checkmark of High Blood Pressure and You, then I would want a result of I10. If someone checks High Cholesterol and Anyone in Family, I would want a result of Z83.42. (Note, these codes are for use in the notification email, not for the user to see).

     

     

    My solution to use the technique you described to do the following:

     

    1. There is a new hidden field called HBP, and if someone checks of High Blood Pressure and You, then HBP gets filled with "You".

    2. There is another new hidden field called Hypertension, and it gets filled on Conditional Formatting that says "If HBP is filled, then calculate the value of field 'Hypertension', which then fills in 'I10', into the field.

    3. Finally, for the email, I can use the field 'Hypertension' to give me the code for Hypertension.

     

    So this works, but I was wondering if there was an easier way to do it in one step?

     

    Thanks!

     

    Bhavesh

  • Profile Image
    JotForm Support

    Answered by candy on December 14, 2016 at 10:42 AM

    Dear Bhavesh,

    I have created a form on my side and I have tried the scenario that you have described in your question.

    Unfortunately, I have experienced that it is not possible to get only the certain matrix field code and use this information in conditions and content of the emails.

    I have forwarded this request to our software development team in order to check if it is possible to implement this feature or not.

    Thank you for contacting us.

  • Profile Image

    Answered by veshman on December 14, 2016 at 12:18 PM

    Hi Candy,

    Thank you. I also noticed that the conditional formatting didn't allow us to pick a particular checkbox or radio button, thus necessitating the intermediate field. 

    While it's cumbersome and probably a nightmare to update, it does work. My email output came out like this:

     

    Diagnoses


    Family History - HypertensionZ82.49
    Diabetes - 11.9
    Family History - HypertensionZ82.49
    Hypercholesterolemia -E78.0

    Irregular Heart Rhythm - R00.9
    Family History Arrythmia - Z82.49

     

    One thing that might be a solution is if I'm able to append a field. This way I can just have one field called diagnoses and have conditional logic that appends fields to an existing field (vs replacing the contents of the field). 

    Is that possible?

     

    Thanks,

     

    bhavesh

     

  • Profile Image
    JotForm Support

    Answered by BDAVID on December 14, 2016 at 02:02 PM

    Unfortunately, that is not possible. The Matrix field has the option to assign values to each option in the matrix, however, it is not working:

    You should be notified via this thread when this gets fixed.

  • Profile Image

    Answered by veshman on December 16, 2016 at 01:56 AM

    Thank you for the response. I played around a little with this, and yes, it will indeed be significantly better when it is working vs my workaround. I do need this pretty urgently. Is there a time frame that you could estimate?

     

    Thanks.

  • Profile Image
    JotForm Support

    Answered by candy on December 16, 2016 at 03:06 AM

    Hello again Bhavesh,

    Unfortunately, we are not able to estimate a time frame for implementing any feature.

    Our software development team will be working on this and you are going to be informed via this thread as soon as the feature will be implemented.

    Thank you for your understanding.