We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31319
    • 4 Posts
    After posting the following code:

    [tt][!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` &ccsender=`1` &replyto=`email` &tpl=`ContactForm` &report=`ContactFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`14` !]
    [/tt]
    instead of the form I get this error message on the page:

    Document or chunk not found for template id= ’ContactForm’

    The code was copied from my other website’s contact form that works just fine.
    Am I missing something here? Should I blame my hosting, because at the other hosting the eForm called by the same code works great?

    Thanks a bunch!
      • 10487 MODX Staff
      • 1,535 Posts
      Check for case-sensitivity on your chunk name, I think that’s a common cause for that error message. For example, referencing ’ContactForm’ in your snippet call and your chunk is called ’contactform’ will result in the error message.

        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 31319
        • 4 Posts
        I don’t think I am using any chunks here, or am I lost in terminology?

        My tools here are the eForm snippet and this line of code through which I am calling the eForm. What would be the chunk here?

        `ContactForm` is the default name that I never changed in any of my Modx-based sites.

        Thanks!
          • 10487 MODX Staff
          • 1,535 Posts
          In your snippet call, you have:
          &tpl=`ContactForm` &report=`ContactFormReport`

          That means the snippet is looking for a chunk called ’ContactForm’ for your form layout and, for the email template, it’s looking for a chunk called ’ContactFormReport’. If you don’t have these chunks available in your site install, then you will get the error.

          Check in MODx Manager -> Manage Resources -> Chunks tab. Do you have any chunks with the above names? If not, that’s your problem. If your other site is working fine with eForm, copy the chunks over from that site wink
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 31319
            • 4 Posts
            Brilliant! Now everything fell into place.
            Thanks for your patient walk-through. rolleyes

              • 36627
              • 9 Posts
              weird i get the email with the subject and the above error as content, but not the content itselft.

              [!eForm? &formid=`EnquiryForm` &subject=`[+subject+]` &to=`[email protected]`  &tpl=`EnquiryForm` &gotoid=`15` !]

              <div style="padding:20px; width: 250px; font-family:arial, helvetica, sans-serif; color:#888">
              <p class="error">[+validationmessage+]</p>
              
              <p> Drop me a line.. </p>
              
              
              
              <form id="EnquiryForm" method="post" action="[~[*id*]~]" >
              <p>Name
              <input name="name" id="Name" class="text" style="margin:5px; width: 180px; float:right" type="text"
              eform="Your Name::1:" /></p>
              
              <p>Email
              <input style="margin:5px;  width: 180px;  float:right"  name="email" id="Email" class="text" type="text"
              eform="Email Address:email:1" /> </p>
              
              <p>Subject
              <input style="margin:5px;  width: 180px;  float:right"  name="subject" id="Subject" class="text" type="text"
              eform="Subject::1" /></p></label>
              
              
              <p><textarea name="enquiry" id="enquiry" eform="Enquiry:string:1" rows="20" cols="40">