We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10165
    • 129 Posts
    I wondered if there was a way to limit the file upload size on a particular eForm form file field, without having to limit the site-wide upload

    Would it be a case of hacking the eForm core files maybe?

    Any ideas greatly appreciated

    thanks all...
      • 16278
      • 928 Posts
      You can specify a maximum file size in your form with a hidden field for MAX_FILE_SIZE, though it’s by no means foolproof. See tutorial at http://www.tizag.com/phpT/fileupload.php.

      The PHP manual’s section on file uploads is quite readable, too.
      wink KP
        • 6228
        • 249 Posts
        Don’t hack.

        You can also write a hook that throws an error if the uploaded file is too large.
          lo9on.com

          MODx Evolution/Revolution | Remote Desktop Training | Development
          • 10165
          • 129 Posts
          thanks for the replies, I’ve already added the MAX_FILE_SIZE hidden field, which I understand needs to be right before the file input. I’m not actually allowing upload as such simply attachment to eform.

          I’ll give it a try

          thanks again..