We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19889
    • 616 Posts
    I’m unable to get the snippet to work either - I’m getting the following error on my contact page:

    Document or chunk not found for template id=......

    could anybody please help to solve this - thank you in advance for your help.
      • 26799
      • 177 Posts
      I also get Errors saying "Document or chunk not found for template id= "...

      is this error referring to the &tpl param? because I’ve checked and double checked my chunk name id it’s the same.

      Snippit Call:
      [[eForm?&to=`[email protected]` &gotoid=`1` &tpl=`ContactForm`]]
      


      Chunk of same name "ContactForm":
      <div id="internships-form">
      	<form method="post" action="#">
      	<h2>Contact Information</h2>
      	<dl class="name-block">
      		<dt>Name</dt>
      		<dd>
      			<label for="first" class="first"><input class="txt" type="text" name="first" id="first" />First</label>
      
      			<label for="last" class="last"><input class="txt" type="text" name="last" id="last" />Last</label>
      		</dd>
      	</dl>
      	<p><label for="contact_title">Contact Title</label> <input class="txt" type="text" name="contact_title" id="contact_title" /></p>
      	<p><label for="work_phone">Work Phone</label> <input class="txt" type="text" name="work_phone" id="work_phone" /></p>
      	<p><label for="fax">Fax</label> <input class="txt" type="text" name="fax" id="fax" /></p>
      
      	<p><label for="contact_email">Contact E-Mail</label> <input class="txt" type="text" name="contact_email" id="contact_email" /></p>
      	<dl class="address-block">
      		<dt>Firm Address</dt>
      		<dd class="street1"><input class="txt" type="text" name="street_1" id="street_1" /><label for="street_1">Street Line 1</label></dd>
      		<dd class="street-city"><input class="txt" type="text" name="street_2" id="street_2" /><label for="street_2">Street Line 2</label></dd>
      		<dd class="street-city"><input class="txt" type="text" name="city" id="city" /><label for="city">City</label></dd>
      
      		<dd class="state-zip">
      			<div class="state-div"><input class="txt" type="text" name="st" id="st" /><label for="st">State</label></div>
      			<div class="zip-div"><input class="txt" type="text" name="zip" id="zip" /><label for="zip">Zip</label></div>
      		</dd>
      	</dl>
      	<p><label for="message">Message</label>
      	<textarea name="message" id="message" cols="30" rows="10"></textarea></p>
      
      	<p><label> </label> <input class="btn" type="submit" name="submitted" value="Submit" /></p>
      	</form>
      </div>
      
        • 11975
        • 2,542 Posts
        Hi,

        try with these changes

        <form method="post" action="#">
        <input type="hidden" name="formid" value="myContactForm" />
        


        [!eForm?&formid=`myContactForm ` &to=`[email protected]`&gotoid=`1` &tpl=`ContactForm`!]

        :-)
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 26799
          • 177 Posts
          no-Dice, thanks for the suggestion though.

          Thanks helio...
            • 30223
            • 1,010 Posts
            The minimum information (parameters) eForm needs to work with any form is:

            • &formid - this needs to be the same as the ID attribute of your form. So <form id="myForm" action="[~[(id)]~]"> needs &formid=`myForm`. Without this the form will not work!
            • &tpl - the form template chunk
            • &report - the (email) report template.
            In addition the submit method must be set to POST, otherwise eForm will not handle form submission.


            To test if eForm is working at all I suggest you try the following example:

            form Template: (call it testFormTemplate)
            <form method="post" action="[~[*id*]~]" id="testForm">
               <label for="cfName">Your name: 
               <input name="cfName" id="cfName" type="text" eform="Your Name::1:" /></label>
            </form>
            


            Form Report: (call it testFormReport)
            <p>Here is the result of the test form:</p>
            <p>name: [+cfName+]</p>
            <div id="debug">[+debug+]</div>
            


            and the snippet call:
            [!eForm? &formid=`testForm` &tpl=`testFormTemplate` &report=`testFormReport` &thankyou=`testFormReport` &debug=`3` &noemail=`1` !]
            


            As you can see I’ve set the &thankyou param to the same report template and I’ve set the &noemail param. Thsi way you’ll see the results straight away without having to check your email everytime. The debug param is set to 3, the maximum amount of debug information. This should give you all the format and parameter values and a print of the parsed form temlpate.

            Get this to work and expand everything from there. Make sure your download and install the latest eForm version.
              • 26799
              • 177 Posts
              the latest version seemed to be the issue, I backed up to the second to last version cleared my cache and it works, Thanks, after this project is over I’ll look into spending more time in the new version.
                • 13432
                • 24 Posts
                Hi.
                I’ve now tried to follow TobyL’s example down to every single character. NOTHING happens. Why? Arg.
                • Quote from: jakoblaursen at Jan 16, 2007, 08:03 AM

                  Hi.
                  I’ve now tried to follow TobyL’s example down to every single character. NOTHING happens. Why? Arg.

                  If you’re not calling like "[!eForm? ...!]" that’s likely why.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me