We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Thanks Bruno, I went with a version pretty similar:

    Relevant code section below:

    if ($sum>0){
    $output .= '<td>[[+wf.linktext]][[+wf.wrapper]]</td>';
    
        foreach ($values as $value){
            $output .= '<td><p>' . $value . '</p></td>';
        }    
    }
    


    I have got this working well in the emailTpl - so many many many thanks for that! wink

    What I would also like, is this approach to work on the Order review page I have where we list the products the user has ordered - I have used the same approach, but when rendered onto a resource it doesn't seem to output? I am using formitRetriever so not sure why its not working.

    Any ideas?
      • 4172
      • 5,888 Posts
      did you try it with

      [[!preparerow? &values=`[[!+fi.[[+wf.title]]_Mon]],[[!+fi.[[+wf.title]]_Tue]],[[!+fi.[[+wf.title]]_Wed]],[[!+fi.[[+wf.title]]_Thur]]`]]


      your wayfinder also uncached, there
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 8168
        • 1,118 Posts
        Thanks Bruno, I have most of it working on the FormitRetrieval page now - the only bit not working is this bit - any ideas why it is not pulling the resource title to sit into the <td>?

        $output .= '<td>[[!+fi.[[+wf.title]]]][[+wf.wrapper]]</td>';
        
          • 4172
          • 5,888 Posts
          try to make the placeholders uncached, too
          or, if that doesn't work, send them with the scriptProperties of the preparerow-snippet
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 8168
            • 1,118 Posts
            Quote from: Bruno17 at Jan 07, 2016, 12:24 PM
            try to make the placeholders uncached, too
            or, if that doesn't work, send them with the scriptProperties of the preparerow-snippet

            No joy with uncached either - e.g. as below

            $output .= '<td>[[!+fi.[[+wf.alias]]]] [[!+fi.[[+wf.wrapper]]]]</td>';
            


            How I do send them with the scriptProperties? Never used that function of MODx snippet before - can you share any detail on how that should be done?

            thanks Bruno.
              • 4172
              • 5,888 Posts
              try:
              $output .= '<td>[[+wf.alias]] [[+wf.wrapper]]</td>';


              or

              $output .= '<td>[[!+wf.alias]] [[!+wf.wrapper]]</td>';



              and see, how I send the linktext here, if still needed:
              http://forums.modx.com/thread/99238/formit-creating-an-email-tpl-dynamically?page=2#dis-post-536721 [ed. note: Bruno17 last edited this post 8 years, 4 months ago.]
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 8168
                • 1,118 Posts
                Quote from: Bruno17 at Jan 07, 2016, 01:14 PM
                try:
                $output .= '[[+wf.alias]] [[+wf.wrapper]]]]';


                or

                $output .= '[[!+wf.alias]] [[!+wf.wrapper]]]]';



                and see, how I send the linktext here, if still needed:
                http://forums.modx.com/thread/99238/formit-creating-an-email-tpl-dynamically?page=2#dis-post-536721

                Thanks Bruno - the solution mentioned here worked - http://forums.modx.com/thread/99238/formit-creating-an-email-tpl-dynamically?page=2#dis-post-536721

                Note there is a missing > on the <td on line 14 though wink

                Thanks ever so much for your assistance here Bruno.
                  • 4172
                  • 5,888 Posts
                  Quote from: dubbs at Jan 07, 2016, 01:37 PM

                  Note there is a missing > on line 14 though

                  fixed
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!