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

    I’m really new into this Modx stuff and I like it. Thanks for that, guys.

    Now, I’m trying out eForm. All is working fine except sending an attachment. And I really don’t know why. There is no error shown and the mail arrives... but without attachment. I’m using Modx 0.9.5 and eForm 1.4.3. Maybe it has something to do with the webspace / host? Its 1&1 webspace.
    It’ would me nice if someone could give me a hint.

    So here is "my" code:

    ContactForm chunk:
    <p class="error">[+validationmessage+]</p>
     
    <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm" enctype="multipart/form-data">
     
    		<p><input name="formid" type="hidden" value="ContactForm" /></p>
     
    		<p><label for="cfName">Ihr Name:<br>
    		<input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /></label></p>
     
    		<p><label for="cfEmail">Ihre Email-Adresse:<br>
    		<input name="email" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /> </label></p>
     
    		<p><label for="cfRegarding">Betreff:<br>
    		<input name="subject" id="cfRegarding" class="text" type="text" eform="Form Subject::1" /> </label></p>
     
    		<p><label for="cfMessage">Ihre Mitteilung:<br>
    		<textarea name="message" id="cfMessage" eform="Message:textarea:1" cols="50" rows="10"></textarea></p>
    		</label>
                   <p><label for="attachment">Attachment</label>
            <input class="field" type="file" name="attachment" eform="Attachment:file:0:Only upload of text documents are supported:#LIST pdf,txt,doc " /></p>
     
    		<p><label> </label><input type="submit" name="contact" id="cfContact" class="button" value="Absenden" /></p>



    ... and the Snippet call:

    [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`1`  !]
      • 33337
      • 3,975 Posts
      umm, whats in report chunk? tongue ... can give some more clues.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 916
        • 2 Posts
        You helped me out with a single question grin

        In the Reportchunk the line

        <p>Attachment:<br />[+attachment+]</p>


        was missing. rolleyes

        thank you so much!
          • 20751
          • 122 Posts
          Another obvious point I’ve just spent an hour figuring out . . . make sure your form has enctype="multipart/form-data"

          grin
            • 40045
            • 534 Posts
            Thanks for the last tipp =)
              • 34162
              • 1 Posts
              Quote from: exside at Aug 07, 2010, 02:02 AM
              Thanks for the last tipp =)

              This really was the answer of this... tks a lot