We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10780
    • 69 Posts
    Hi,

    I’m trying to use eForm to create an upload function on my site.

    Here is the code I am using to call the form.

    [!eForm? &formid=`feedBackForm` &to=`[email protected]` &tpl=`eUploadForm` &report=`eFeedbackReport` &thankyou=`eThanksForm` &vericode=`1` &subject=`Artwork Upload`!]


    I have an upload form called eUploadForm

    <form method="post" action="[~[*id*]~]">					
    <fieldset>
    						<h2>Recipient Details</h2>
    						<label for="attention"><span class="label">For the attention of</span>
    						<input type="text" name="attention" value="" /></label>
    						<h2>Your Details</h2>
    						<label for="name"><span class="label">Name</span>
    						<input type="text" name="name" value="" /></label>
    						<label for="email"><span class="label">Email Address</span>
    						<input type="text" name="email" value="" /></label>
    						<label for="company"><span class="label">Company Name</span>
    						<input type="text" name="company" value="" /></label>
    						<label for="reference"><span class="label">Job Reference</span>
    						<input type="text" name="reference" value="" /></label>
    						<label for="notes"><span class="label">Notes</span>
    						<textarea></textarea></label>
    						<label for="files"><span class="label">File(s)</span>
    						<input type="file" name="files" value="" /></label>
    <input type="submit" name="submit" value="Upload Artwork">
    					</fieldset>
    					
    					<fieldset>
    						<p>This page allows you to send files directly to our offices.</p>
    						<p>Simply specify the name of the recipient and fill in your name, email and message and then upload the files you wish to send.</p>
    						<p class="note">To ensure that your artwork reaches us intact, please send multiple files in folders.</p>
    					</fieldset>
    				</form>
    


    Basically what is happening is that my form is not being processed, well it doesn’t seem to be. It just reloads the page with form elements cleared out, and I don’t receive any emails.

    What am I doing wrong?
      • 20413
      • 2,877 Posts
      1. You have &formid=`feedBackForm` but no id set in the <form>

      http://wiki.modxcms.com/index.php/EForm#eForm_Forms
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 10780
        • 69 Posts
        Yeah I made that change and the form is still not processing.
          • 20413
          • 2,877 Posts
          2. You need enctype="multipart/form-data" in your <form>
          3. Do the other tpl’s (&thankyou tpl) have correct placeholders?
            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 10780
            • 69 Posts
            Well I have an eThanksForm template, just has a h3 tag in it with a thank you message.

            What else do I need? because it still just reloading the page.
              • 20413
              • 2,877 Posts
              4. You have &vericode=`1` - Do you also have
              <input type="text" name="vericode" />
              <a href="[+action+]"><img align="top" src="[+verimageurl+]" width="148" height="60" alt="If you have trouble reading the code, click on the code itself to generate a new random code." /></a> 
              
              ...in the form
                @hawproductions | http://mrhaw.com/

                Infograph: MODX Advanced Install in 7 steps:
                http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                • 10780
                • 69 Posts
                Thanks for that,

                However I am still struggling.

                I have managed to get the form to complete, send and attach the files, however the data is not being processed, stuff from the Name, Company name etc... it’s not being displayed in the email and I am getting this:

                Resource or Chunk not found for template id= ’eFeedbackReport’

                Now I don’t have an eFeedbackReport template or chunk. What is this for?
                  • 33337
                  • 3,975 Posts
                  Its from &report=`eFeedbackReport`

                  You need a chunk for your eform report as well.

                  Also if you are attaching files, you need to add the following to your form tag.
                  enctype="multipart/form-data"
                  

                  You are also missing the form ID, so it will become
                  <form method="post" action="[~[*id*]~]" enctype="multipart/form-data" id="feedBackForm">
                  


                  Hope this helps.
                    Zaigham R - MODX Professional | Skype | Email | Twitter

                    Digging the interwebs for #MODX gems and bringing it to you. modx.link
                    • 10780
                    • 69 Posts
                    Yeah but what is the chunk for? Is it for the displaying of data in the email?
                      • 10780
                      • 69 Posts
                      What is the eForm report for?

                      I am getting the form processing to a point. It actually attaches the file, but I get this message:

                      Resource or Chunk not found for template id= ’’

                      Any ideas?