Jul 05, 2009, 09:08 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Read what MODx Developers say: MODx Dev. Blogs
Pages: [1]   Go Down
  Print  
Author Topic: Attaching a .zip with eForm  (Read 378 times)
0 Members and 1 Guest are viewing this topic.
antirem
Jr. Member
*
Posts: 49



WWW
« on: Dec 23, 2008, 09:48 PM »

I need some help making an eform call that will let you attach a zip file.  I will also need to be able to limit the file size that it can be...

here is my stab at it... anyone see whats wrong?

Code:
[+validationmessage+]

<form action="[~[*id*]~]" id="contact" method="post">
  <input name="formid" type="hidden" value="contact" />
  <dl class="form">

    <dt><label for="cfName">Your name:</label></dt>
    <dd><input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /></dd>

    <dt><label for="cfEmail">Your Email Address:</label></dt>
    <dd><input name="email" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /></dd>

    <dt><label for="cfRegarding">Regarding:</label></dt>
    <dd><input name="subject" id="cfRegarding" class="text" type="text" eform="Form Subject::1" /></dd>

    <dt><label for="cfMessage">Message:</label></dt>
    <dd><textarea name="message" id="cfMessage" eform="Message:textarea:1"></textarea></dd>

    <dt><label for="attachment">Attachment</dt>
    <dd><input class="field" type="file" name="attachment" accept="zip" eform="Attachment:file:0" /></dd>

    <dt><label>&nbsp;</label></dt>
    <dd><input type="submit" name="contact" id="cfContact" class="button" value="Send This Message" /> <input type="reset" name="reset" id="cfReset" class="button" value="Reset" /></dd>

  </dl>
  </fieldset>
</form>
Logged

The most important site you will ever visit... Are Zombies Attacking .com
Minneapolis Web Design <-- where i work
MODx Templates <-- new project im working on (still in the works)
tkfm
Committed to MODx
*****
Posts: 843


WWW
« Reply #1 on: Dec 23, 2008, 11:43 PM »

Don't you have enctype="multipart/form-data" in your form tag ?
For examples...
Code:
<form action="[~[*id*]~]" method="post" enctype="multipart/form-data">
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!