Can I use the matrix graphic seen in email confirmation on another web page?

  • Profile Image
    Gary Stanford
    Asked on August 07, 2012 at 03:04 PM

    The email confirmation uses a cool graphic to display a matrix and the selections. Is there any way I can use this same graphic or show the selections a similiar way?

    I'm currently tryin to do something like this to display the array:

    <pre><?php print_r($_POST['choosean83']); ?></pre><br />

    And the result is showing this:

    Array ( [0] => [\"1st Choice\"] [1] => [\"3rd Choice\"] [2] => [\"2nd Choice\"] )It's not capturing any of my rows on the matrix which are different instruments so it's rather useless until I can get it formatted correctly. Any ideas?
  • Profile Image
    fxr
    Answered on August 08, 2012 at 05:10 AM

    Hi.

    If you want to recreate the table used in the email. 

    You will need to parse the values passed to php for the matrix field. 

    I have created the php/HTML to this for your form here

    I have cloned your form and you can see this table being generated here

     

  • Profile Image
    Gary Stanford
    Answered on August 08, 2012 at 05:10 PM

    Thanks much! This looks fantastic! And I now know how to do the php conversion thanks to you. Excellent product and support!

  • Profile Image
    Gary Stanford
    Answered on August 09, 2012 at 06:20 PM

    Hi Team,

    I've been playing with your solution and realizing there is one thing not quite working yet. It is not putting the check marks in the right spots but I have not been able to figure it out. If you have selected an item in rows 4, 5, 6 and such it does not record those locations when it's doing the post of those marks onto the html page.

    Any ideas what could be missing?

    Thanks!

    Gary

  • Profile Image
    NeilVicente
    Answered on August 09, 2012 at 08:03 PM

    @Gary

    On behalf of our colleague fxr, I went ahead and tested your form, but I can't seem to reproduce the problem you described. Check the images below for proof:

     

    The only problem I see is that the post data are being displayed right below the matrix table on your thank you page. You probably need to double check your PHP codes.

    Anyway, if you're still having issues with this, please do not hesitate to contact us again.

  • Profile Image
    stanfordjr
    Answered on August 10, 2012 at 02:32 AM

    Unfortunately after many re-try's this weekend, the issue back for me and won't go away. It is continually logging the selections in the wrong rows. Can you guys produce this on your end?

  • Profile Image
    stanfordjr
    Answered on August 13, 2012 at 01:42 AM

    Unfortunately after many re-try's this weekend, the issue back for me and won't go away. It is continually logging the selections in the wrong rows. Can you guys produce this on your end?

  • Profile Image
    NeilVicente
    Answered on August 13, 2012 at 09:18 AM

    @stanfordjr

    I think your own modification to the codes provided by fxr have messed up its functions. My tests confirm that the matrix fields in the results page aren't properly checked.

    Kindly paste your modified codes here and give us the link so we can check for errors and possibly provide a fix.

  • Profile Image
    stanfordjr
    Answered on August 13, 2012 at 02:12 PM

    Ok, not sure what I changed but I have pasted the form results page. "function parse" should still be intact.

    Thanks!
    Gary

  • Profile Image
    stanfordjr
    Answered on August 13, 2012 at 03:26 PM
  • Profile Image
    NeilVicente
    Answered on August 13, 2012 at 11:00 PM

    The odd thing is that those codes work perfectly fine on your form and this cloned version as well. Please do test that out to see for yourself.

    Did you copy those codes exactly as they appear on your webpage?

  • Profile Image
    fxr
    Answered on August 14, 2012 at 10:25 AM

    Gary,

    I am on vacation until Monday, if you can hold on, I will revisit this then to see if we can sort out why you havent been able to get it to work. 

     

  • Profile Image
    stanfordjr
    Answered on August 15, 2012 at 04:57 PM

    Ok thanks, have a good time off see you on the other end.

  • Profile Image
    fxr
    Answered on August 21, 2012 at 07:22 PM

    Hi again, Gary

    Sorry about the delay on this.

    I was looking at this again this morning and worked out why it wasnt working for you.

    Its the way the array variables from the matrix gets passed to the thankyou page.

    if you enter in values in the 1,3 & 4 rows or say the 2,4,& 6 rows, you get passed back array elements 0,1,2 containing the data that you are interested in. That makes it impossible to work out which row has been selected unless ALL of them have something filled in. 

    I will sleep on it and see if I can come up with some kind of workaround. 

  • Profile Image
    stanfordjr
    Answered on August 22, 2012 at 05:52 PM

    ok sounds good really appreciate it. The email notification does it correctly by the way.

  • Profile Image
    fxr
    Answered on August 23, 2012 at 07:01 AM

    Gary,

    The only way I could get this to work was to put the 1st Choice, 2nd Choice & 3rd Choice down the left hand side with the instrument options on the top. 

    An example is shown here

    --

    It actually made the php code a lot more straightforward logically. It should be easier to understand. 

    I have included php and the HTML responsible for the rendering the table. 

    -> http://pastie.org/4573745

    --

    Please let me know if you have any questions or need any help styling your form or results table to suit your needs. 

     

     

  • Profile Image
    stanfordjr
    Answered on August 23, 2012 at 04:00 PM

    So I must be doing something wrong with styling the form I guess? I copied your results table code "as-is" but am using my own matrix form control of course and it's not tracking the selections. Thus far all the results are coming up as "-".

    Any thing special needed on the form creation?

  • Profile Image
    fxr
    Answered on August 23, 2012 at 04:40 PM

    Can you link me up your php/html source of your thankyou page to -> http://pastie.org/ ?

  • Profile Image
    stanfordjr
    Answered on August 23, 2012 at 05:08 PM

    Sure thing, here it goes:

    http://pastie.org/4576751

  • Profile Image
    fxr
    Answered on August 23, 2012 at 06:20 PM

    For whatever reason your post var names have changed, maybe you cloned the field or something, anyway:

    can you change the three lines?

    $row1 = $_POST['choosean'][0];

    $row2 = $_POST['choosean'][1];

    $row3 = $_POST['choosean'][2];

     

    to

     

    $row1 = $_POST['choosean83'][0];

    $row2 = $_POST['choosean83'][1];

    $row3 = $_POST['choosean83'][2];

     

    That should sort you out.

    If you want to tinker with the CSS responsible for rendering that results table to make it looks just a little prettier, please do let me know. 

  • Profile Image
    Answered on August 23, 2012 at 07:13 PM

    Hmmm well I just tried 'choosean83' and 'chooseAn83' but still no luck. I would love to play with the css to alter the matrix, the last column is a little wonky.

    What do you think?

  • Profile Image
    Answered on August 23, 2012 at 07:27 PM

    Ah think I figured it out. I was playing with the old code you provided and used the strpos call for each check box.

    Works like a charm now. I think all that is left is a css adjustment and we are golden.

     

  • Profile Image
    fxr
    Answered on August 23, 2012 at 07:30 PM

    ah cool.

    ---

    Use can this CSS on the form

    .form-matrix-column-headers {font-family:arial; width:70px !important; text-align:center}

    .form-matrix-row-headers {font-family:arial;width:100px !important; font-weight:bold;}

     

    The issue with the html/php may be that the form source code may neeed reembeded. 

    Not that it is really going to matter, but is there any particular reason why you are embedding the forms full source code on your website?

    --

    I have cloned your form & your thankyou page and added a little modifications.

    -> http://form.jotformeu.com/form/22357489968373

    -> thankyou page html/css/php -> http://pastie.org/4577435

  • Profile Image
    Answered on August 23, 2012 at 07:37 PM

    Ok let me give it a shot thanks.
    I tried to 'embed' before but it wasn't formatting the form correctly on the page. I can play with it again later.

    Mainly just trying to get all the functionality to work as-is, and then I want to add even more enhancements to the style and functionality down the road...

    Thanks for all the help! Tech support is rarely this spectacular :)

  • Profile Image
    fxr
    Answered on August 23, 2012 at 07:40 PM

    Cool. Thanks.

    Have a play around, yeah your probs best getting it functioning correctly first and working from there. 

    Shout back if you do have any ideas as regards any tweaks you want to try to make to how things look and we will do our best to find a solution. Its what we are here for.