We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32667
    • 38 Posts
    For: 0963

    I’m trying to insert document contents as a template parameter for eForm

    Here is the eForm Call
    [[Include? &file=`eform/snippet.eform.php` &return=`1` &to=`[email protected]` &cc=`[email protected]` &replyto=`email` &formid=`contact` &tpl=`ContactForm` &report=`ContactFormReport` &thankyou=`[!getDoc?docid=`111796`!]` &vericode=`0` &subject=`Web site feedback | [+subject+]`]]
    


    So you can see that I’m trying to do this for the thankyou variable.

    The getDoc snippet is simple - it just grabs the content for the specified doc:
    <?php
    $data =  $modx->getPageInfo($docid, $active= 1, $fields= 'content');
    return $data['content'];
    ?>
    


    The eForm will submit the data properly but the thank you text is not the result of the specified document - it’s the default response by eForm.

    Any suggestions?

    Thanks in advance.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Have you tried using a TV with @DOCUMENT instead? Nested snippets can be quirky at times, especially with complex snippet calls like that.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 32667
        • 38 Posts
        Quote from: sottwell at Mar 27, 2009, 07:11 PM

        Have you tried using a TV with @DOCUMENT instead? Nested snippets can be quirky at times, especially with complex snippet calls like that.

        I have not Susan. I was trying to avoid having to setup TV’s for every chunk that I am converting to documents.

        Will give it a go though. Thanks.