We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10903
    • 23 Posts
    Hello

    I am tryiing to use eForm (v1.4.3) for the first time but I always get the message "Document or chunk not found for template id= ’’ when opening the document that contains the snippet call. I double checked my code several times but cannot figure out what I am doiing wrong.

    Suggestions are very welcome!

    Many thanks
    Gino


    Snippet call (within a TinyMCE page):
    [!eForm? &formid='ContactForm' &to='[email protected]' &tpl='ContactFormTpl' &report='ContactEmailTpl' &thankyou='ContactConfirmationTpl' &subject='Test'!] 


    Chunk ContactFormTpl
    <div id="errormessage">[+validationmessage+]</div>
    <form method="post" action="[~[*id*]~]">
    <input type="hidden" name="formid" value="ContactForm" />
    <label for="name">Naam</label>
    <input type="text" name="name" id="name" maxlength="40" eform="Naam:string:1:Gelieve een naam in te vullen" />
    <label for="email">E-mail</label>
    <input type="text" name="email" id="email" eform="E-mail:email:1:Gelieve een correct e-mail adres in te vullen" />
    <input type="submit" name="submit" value="Versturen" />
    </form>


    Chunk ContactEmailTpl
    <p>Beste</p>
    <p>Een contact e-mail werd verstuurd vanop de website met daarin de volgende gegevens:</p>
    <table>
    <tr><td>Naam</td><td>[+name+]</td></tr>
    <tr><td>E-mail</td><td>[+email+]</td></tr>
    </table>


    Chunk ContactConfirmationTpl
    <p>Beste [+name+]</p>
    <p>Bedankt voor uw vraag of opmerking.  We zullen zo snel mogelijk antwoorden.</p>


    • Ah, the backtick `` versus single-quote ’’ issue. Don’t use single-quotes, use backticks in a snippet call. It’s looking for a chunk named " ’ContactFormTpl’ " and of course doesn’t find it.
        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
        • 10903
        • 23 Posts
        Tnx sottwell ! This did the trick. I was looking over that one ... definitely need glasses smiley.

        Cheers
        Gino