We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15065
    • 138 Posts
    Hi
    I am new to this snippet. I have created one site and created some document pages. I need one contact page. In this some information ( name, phone, suggestion text ) is send to my address on submit.
    For this,
    1.I have created one document ’ contact’
    2.Then I created one form with input boxes and submit button and put these code and eForm code in above document’s html code section [ like pasting content on other document ]
    3.When I call the document, only the form with input boxes and submit button is appearing with a message like "Document or chunk not found for template id= ’’submitform’ ’ . submitform is my form’s value.
    4.And nothing happening on submit.
    I have one template and I am using this template on all documents.

    Where I have to call eForm code ? Is the form code is needed to place any some other place ? There is any need to create another template ? I searched a lot in documentations, but didn’t get.

    Pls help me

    Thanks & Regards,
    Jurdy
      • 25663 MODX Staff
      • 12,272 Posts
      It would be very helpful to see your call to eform, your form template chunk and your report template chunk.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 15065
        • 138 Posts
        Hi Ryan

        Now, my error message is disappeared. But NOTHING HAPPENING WHEN I CLICK ON SUBMIT. THE SAME PAGE IS DISPLAYING. Below is my form code, I make a new template named ’submitform’. I placed the common template code in this template and then put these code also in place of content . ie now my submitform template contains the common template code and this form code . And I used this template in my contact document insted of common template.
        <form  method="post" >
        <input type="hidden" name="formid" value="submitform" />
        	<div>
        	<strong>Let us know of any questions you may have or any dates you prefer</strong> 
        	</div>
        	<br />
        	<div>
        	<label><strong>Name:</strong></label> <input name="name" size="25" type="text" /> 
        	</div>
        	<br />
        	<div>
        	<label><strong>Email:</strong></label> <input name="email" size="25" type="text" /> 
        	</div>
        	<br />
        	<div>
        	<label><strong>TEL:</strong></label> 
        	</div>
        	<div>
        	<input name="phone" size="25" type="text" /><font color = '#971B1E'></font><strong> *<br />
        	<strong>Comments:</strong><br />
        	<textarea cols="40" name="comments" rows="5"></textarea><br />
        	<input type="submit" value="Send" /> <input type="reset" value="Reset" /> </strong>
        	</div>
        	<div>
        	Please call <strong>Jia Jia</strong> our Chinese & English Consultant in Vanouver @ <strong>604-812-6616</strong> for your events planning and booking for the resort. <br />
        	<br />
        	</div>
        </form>
        
        


        This is my Report code. I made this code as a chunk named ’contactreport’
        <p>This is a response sent by [+name+] using the feedaback form on the website. The details of the mesage follow below:</p>
        <table>
        <tr valign="top"><td>Name:</td><td>[+name+]</td></tr>
        <tr valign="top"><td>Email:</td><td>[+email+]</td></tr>
        <tr valign="top"><td>Phone:</td><td>[+phone+]</td></tr>
        <tr valign="top"><td>Comments:</td><td>[+comments+]</td></tr>
        </table>
        <p>Would [+name+] like to be on our mailing list? <strong>[+list+]</strong></p>
        
        <p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE:From Mt Danielwaterfrontresort">[+email+]</a></p>
        
        



        Below is my eform code. I placed this in my document named ’contact’ . id 10 is a thankyou page[goto id =’10’]
        [[eForm? &formid=`submitform` &to=`[email protected]` &tpl=`submitform` &report=`contactreport` &gotoid=`10`&vericode=`1`]] 
        


        Where I did my mistake .
        Pls help ASAP

        Jurdy
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ah, there’s your problem. An interactive snippet has to be called uncached
          [!eForm? ... !]

          if it’s on a cached page.
            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
            • 15065
            • 138 Posts
            Hi
            I tried it with following code, with page settings ’cacheable’ checked and unchecked. But the same page is displaying on submit.
            This code I placed in a document named ’contact’.
            [! eForm? formid=`submitform` to=`[email protected]` tpl=`submitform` report=`contactreport` gotoid=`10` vericode=`1` !]
            

              • 28042 ☆ A M B ☆
              • 24,524 Posts
              All of the parameters need to have a prefix of &
              [!eForm? &formid=`submitform` &to=`[email protected]` &tpl=`submitform` &report=`contactreport` &gotoid=`10` &vericode=`1`!]
                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
                • 15065
                • 138 Posts
                Hi

                When I paste the eForm code to content area of my contact page it became
                [!eForm? &formid=`submitform` &to=`[email protected]` &tpl=`submitform` &report=`contactreport` &gotoid=`10` &vericode=`1`!] 
                


                is it include in template? is this my error? what I have to do ?
                  • 25663 MODX Staff
                  • 12,272 Posts
                  That is the rich text editor transforming the ampersands into html entities. Should cause no problems.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 15065
                    • 138 Posts
                    Hi Ryan
                    But it is not working... what will be the reason ? do you need username and password for checking?
                    I got the same page when I submit my page . nothnig happening...
                      • 25663 MODX Staff
                      • 12,272 Posts
                      eForm is looking for a chunk (template) named "submitform" which doesn’t exist in your instance. I see that it is set up as a template, but that’s not the way eForm works and it won’t know what to do (probably should add some better error catching here if it doesn’t find the specified params).

                      The only reason the form renders is because it’s included in the template. You might be able to omit the &tpl param and it might work, but I’ve not built one this way in a while. Someone will chime in with an answer on that one though.

                      Good luck!
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me