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


    I just discovered I never asked to myself " what if I wanna form with an attached file " huh

    I did not found into those forums.

    So how can I add some ’browse file’ action to give the visitor the capability to select some local file to be sended with the mail ?

    Thank you
      Schtroumpf Grognon - Grouchy Smurf
      ---------------------------------
      Faites pas attention.. - Don't pay attention
      http://www.dzi-neo.net
      • 30223
      • 1,010 Posts
      Start by reading the eform documentation. It’s all there...

      Create an <input type="file" name="fileattachment" eform=’Whatever:file:0"> in your form template and set the enctype of the form to enctype="multipart/form-data".

      That’s pretty much all you need to do to have an attachment send with the email
        • 8790
        • 526 Posts
        thank you


        I did not find any reference to such an entry in any pages around( <input type="file" name="fileattachment" eform=’Whatever:file:0"> )

        With you exemple , now that’s it.

        (except nothing seems to get out and I cycle, stucked into the form with no "thank you" page, but this is another story )

        Regards
          Schtroumpf Grognon - Grouchy Smurf
          ---------------------------------
          Faites pas attention.. - Don&#39;t pay attention
          http://www.dzi-neo.net
          • 27330
          • 884 Posts
          sorry to wake the dead but I have a question in the matter smiley

          what about if I want to allow multiply files upload, I’m afraid i might have some restriction on the file sizes if I attach many of them.
          I want to allow customers an easy way to transfer their files to me and was thinking on creating an eform with upload option.

          Do you think eform is the right way or is there a better alternative for that?

          thanks.
            • 7231
            • 4,205 Posts
            I think that FTP may be better since it can be a drag’n drop experience. I sometimes will create a dir for clients to upload docs to and it works out well. The best practice for users is to simply email the files since it is a familiar interface but could be a mess to keep organized.

            As for sending them over eForm, I would recommend asking them to make a zip file and transfer as one document.

            I think that in php the upload limit will take into consideration the entire group of documents, it is not based on individual document size. I could be way wrong though.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 27330
              • 884 Posts
              I’ve just installed the fileupload snippet. I think it’ll do what I need. but I think you are right about the php upload size limitation.
              I was thinking about FTP but go explain them how to use it...
                • 7231
                • 4,205 Posts
                FTP trough IE or FireFox (with extension) is not to complicated to get them to understand.

                  [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                  Something is happening here, but you don&#39;t know what it is.
                  Do you, Mr. Jones? - [bob dylan]