How do I get matrix data by POST?

  • Profile Image
    bvc1311
    Asked on August 08, 2012 at 05:51 AM

    Good morning,

    I have the following form: http://form.jotformeu.com/form/22197951348361

    As you can see, that form have a matrix. The problem is that I can't get the data from the matrix by POST. I want to save the data in a database ordered by days.

    Best regards.

  • Profile Image
    NeilVicente
    Answered on August 08, 2012 at 06:55 PM

    The values of a matrix table are passed as an array. Fill out this sample form to see how the matrix values are passed:

    http://form.jotform.me/form/22207275615450?

    For your reference, here is the source code for the PHP parser I used:

    https://gist.github.com/3299554

  • Profile Image
    bvc1311
    Answered on August 09, 2012 at 10:55 AM

    Thanks for your help NeilVicente, it worked!

  • Profile Image
    bvc1311
    Answered on August 10, 2012 at 12:29 PM

    Hello again,

    I have anoher question about this subject. In my form, I have the days in the left column. When I post the data from the matrix, the array positions are 0, 1, 2, etc.

    The problem is, I want those days to save them in the database. For example:

    Day 1 - Morning, Afternoon

    Day 20 - Evening

    I want the 1 and the 20. It's possible to get them?

    Best regards.

  • Profile Image
    johncausing
    Answered on August 11, 2012 at 12:24 AM

    Hi. You can visit this link to insert form submission to the database: http://www.jotform.com/help/126-How-to-Insert-or-update-form-submissions-to-your-MySQL-database-using-PHP - I hope that helps.

  • Profile Image
    liyam
    Answered on August 11, 2012 at 03:12 AM

    Hello bvc1311.  Upon testing, I see a problem in identifying the matrix data in the array.  I will inform the developers of this matter.  We'll keep you posted as soon as we get updates.

    Thanks for your patience.

  • Profile Image
    bvc1311
    Answered on August 14, 2012 at 07:30 AM

    johncausing, thanks for your help, but that topic don't have the answer to this question.

     

    Thanks liyam, I'm waiting. Hope you can fix that.

  • Profile Image
    Mike_T
    Answered on August 14, 2012 at 05:38 PM

    @bvc1311,

    Once we get any more information for you, we will let you know by updating this thread.

    Thank you for cooperation.