We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7434
    • 24 Posts
    Hi everybody

    I need to create a dynamic form which will send an email with the contents.

    The form has some static fields (name, email etc etc) and a list with products which the visitor can fill the quantity he wants to order.
    The number of products is not the same all the time. I have created a TV (check box), let's call it TV_PURCHASE for the products so if it is checked in the backend the product will be available for purchase (I use the filter option in ditto)

    I call the form from the page like this:

    [!eForm? &formid=`ContactForm` &subject=`order` &from=`[email protected]` &to=`[email protected]` &ccsender=`0` &tpl=`order-form` &report=`OrderReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`270` &debug=`0` !]


    The order-form template is like this:

    <table>
    <tr>
    <td>some static fields</td>
    </tr>
    [b]<tr>
    <td>dynamic field 1</td>
    </tr>
    <tr>
    <td>dynamic field 2</td>
    </tr>
    <tr>
    <td>dynamic field 3</td>
    </tr>[/b]
    </table>


    so I tried to populate the rows with the dynamic fields with a ditto call :
    [!Ditto? &parents=`59,60`&orderBy=`createdon DESC` &filter=`TV_PURCHASE,TRUE,1` &hideFolders=`1` &depth=`0` &tpl=`TPL_PRODUCT_ROW`!]


    and in the TPL_PRODUCT_ROW I just added:

    <tr>
    <td>[+pagetitle+]</td>
    </tr>


    The problem is that when the page renters it does not processes the ditto call. Instead it displays the ditto call code in the page.

    Does anyone has any idea why?

    Regards
    Dimitris
      • 4041
      • 788 Posts
      First thing try using uncached tags on the ditto call:
      ex: [[Ditto? &params...]]
        xforum
        http://frsbuilders.net (under construction) forum for evolution
        • 7434
        • 24 Posts
        Tnx, the ditto call code is gone from the page but I get no results, even with a simple call, without filtering
          • 4041
          • 788 Posts
          Try using [+title+] in your ditto template instead of [+pagetitle+]
            xforum
            http://frsbuilders.net (under construction) forum for evolution
            • 7434
            • 24 Posts
            I tried that :-(
            It doesn't even bring the id. Something else must be going on :-(
              • 36459
              • 9 Posts
              Perhaps this thread might help you:

              http://forums.modx.com/thread/?thread=46679
                • 7434
                • 24 Posts
                tnx