Jul 05, 2009, 09:15 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  
Pages: [1]   Go Down
  Print  
Author Topic: eForm How to set up with attachment, Selector, Radio Buttons Etc  (Read 717 times)
0 Members and 1 Guest are viewing this topic.
zeio
Jr. Member
*
Posts: 29


« on: Dec 23, 2008, 08:57 PM »

hello  Smiley,

Was wondering how to set up eForm, the basic example set up worked fine, but the other example was for specifically sedning a job application.
Apart from that eForm made little sense to me how to set it up myself in regards to adding attachments, selectors radio buttons etc (would also like to be albe ot have multiple attachments on a form)  Undecided  Huh

this is what I tried for putting one attachment:

[!eForm? &formid=`hmm` &to=`myemail@emailprovider.com` &tpl=`counter` &report=`feedback` &vericode=`1` &subject=`SendUs`!]

Chunk Name: counter

<br />
[+validationmessage+]
<form id="hmm" method="post" action="[~[*id*]~]">
<p><label accesskey="n" for="Name">Your First & Last Name</label><br />
<input type="text" name="Name" size="32" maxlength="60" eform="Your Name::1:Must post at least two words:#REGEX /^\w+\s\w+/i" /></p>
<p><label accesskey="e" for="email">Your Email Address</label><br />
<input type="text" name="email" size="32" maxlength="40" eform="Your Email Address:email:1" /></p>
<p><label accesskey="a" for="attachment">Attach Picture One</label><br />
<input class="file" type="file" name="attachment" eform="Attachment:file:0:Only Images and Text Files Supported:#LIST jpg,gif,png,txt,doc,rtf" />
<p><label accesskey="c" for="comments">Comments</label><br />
<textarea cols="23" rows="11" name="comments" eform="Comments:html:1"></textarea></p>
Please enter the code below then press send:<br />May contain one or more
capital letters<p>
<img src="[+verimageurl+]" alt="verification code" border="1"/></p><p><label accesskey="c" for="vericode">code</label>
<input type="text" name="vericode" size="20" /></p><p><input type="submit" name="submit" value="Send Feedback"></p>
</form><br /><br />

Chunk Name: feedback

<p>This is a response sent by [+name+] using the feedback form on the website. The details of the message follow below:</p>
<table>
<tr valign="top"><td>Name:</td><td>[+name+]</td></tr>
<tr valign="top"><td>Email:</td><td>[+email+]</td></tr>
<tr valign="top"><td>Attachment</td><td>[+attachment+]</td></tr>
<tr valign="top"><td>comments:</td><td>[+comments+]</td></tr>
</table>
<p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE:[+subject+]">[+email+]</a></p>


Unfortunately the end result was I got sent an email but with no attachment when I tried adding .txt and .jpg files at different times

I really think the documentation for eForm (although great in some ways) needs tutorials on how to set up attachments, radio buttons, selectors and extra input boxes, as people like me (designers) have no chance of understanding without documentation and this is 'really really really really' important for setting up forms

Thanks from Josh

« Last Edit: Dec 23, 2008, 09:24 PM by zeio » Logged
mrhaw
Committed to MODx
*****
Posts: 1,087


modx == freedom


WWW
« Reply #1 on: Dec 23, 2008, 09:13 PM »

To start with: http://modxcms.com/forums/index.php/topic,30270.msg183976.html#msg183976 Smiley
Logged

My playground: http://4up2date.info  | Host: (mt) Media Temple (gs) | Server: Apache 2.0 | MySQL 4.1.11 | PHP 5.2.6 | MODx 0.9.6.3 (patchwork)
zeio
Jr. Member
*
Posts: 29


« Reply #2 on: Dec 23, 2008, 09:43 PM »

Thankyou MrHaw  Cool

Adding enctype="multipart/form-data" to 'form action' did the trick and the attachment arrived  Smiley

Also for multiple file attachments, how would this be set up?

How would the below be set up for multiple attachments, (I just copy and pasted a repeat for examples sake as I don't know what to do)
<p><label accesskey="a" for="attachment">Attach Picture One</label><br />
<input class="file" type="file" name="attachment" eform="Attachment:file:0:Only Images and Text Files Supported:#LIST jpg,gif,png,txt,doc,rtf" />
<p><label accesskey="a" for="attachment">Attach Picture Two</label><br />
<input class="file" type="file" name="attachment" eform="Attachment:file:0:Only Images and Text Files Supported:#LIST jpg,gif,png,txt,doc,rtf" />


And the email back to me???
<tr valign="top"><td>Attachment</td><td>[+attachment+]
<tr valign="top"><td>Attachment</td><td>[+attachment_1+]
??

Thanks
Logged
mrhaw
Committed to MODx
*****
Posts: 1,087


modx == freedom


WWW
« Reply #3 on: Dec 23, 2008, 10:18 PM »

How would the below be set up for multiple attachments, (I just copy and pasted a repeat for examples sake as I don't know what to do)
<p><label accesskey="a" for="attachment">Attach Picture One</label><br />
<input class="file" type="file" name="attachment" eform="Attachment:file:0:Only Images and Text Files Supported:#LIST jpg,gif,png,txt,doc,rtf" />
<p><label accesskey="a" for="attachment">Attach Picture Two</label><br />
<input class="file" type="file" name="attachment" eform="Attachment:file:0:Only Images and Text Files Supported:#LIST jpg,gif,png,txt,doc,rtf" />

And the email back to me???
<tr valign="top"><td>Attachment</td><td>[+attachment+]
<tr valign="top"><td>Attachment</td><td>[+attachment_1+]
??

Try this:

<p><label accesskey="a" for="attachment">Attach Picture One</label><br />
<input class="file" type="file" name="attachment" eform="Attachment:file:0:Only Images and Text Files Supported:#LIST jpg,gif,png,txt,doc,rtf" />
<p><label accesskey="a" for="attachment2">Attach Picture Two</label><br />
<input class="file" type="file" name="attachment2" eform="Attachment 2:file:0:Only Images and Text Files Supported:#LIST jpg,gif,png,txt,doc,rtf" />

<tr valign="top"><td>Attachment</td><td>[+attachment+]
<tr valign="top"><td>Attachment 2</td><td>[+attachment2+]

Logged

My playground: http://4up2date.info  | Host: (mt) Media Temple (gs) | Server: Apache 2.0 | MySQL 4.1.11 | PHP 5.2.6 | MODx 0.9.6.3 (patchwork)
zeio
Jr. Member
*
Posts: 29


« Reply #4 on: Dec 23, 2008, 10:49 PM »

Thankyou again MrHaw

Worked just perfectly

Cheers from Josh

 Smiley
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!