Topic: eForm How to set up with attachment, Selector, Radio Buttons Etc  (Read 1098 times)

Pages: [1]   Go Down

#1: 23-Dec-2008, 08:57 PM

zeio
Posts: 29

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: 23-Dec-2008, 09:24 PM by zeio »

#2: 23-Dec-2008, 09:13 PM


mrhaw
Posts: 1,937

modx == freedom

WWW
To start with: http://modxcms.com/forums/index.php/topic,30270.msg183976.html#msg183976 Smiley
My playground: http://4up2date.info | Twitter: mrhaw
---> Check out: ReadSpeaker webReader Plugin | Support/Comments Thread

--=[ MR. HAW ]=--

#3: 23-Dec-2008, 09:43 PM

zeio
Posts: 29

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

#4: 23-Dec-2008, 10:18 PM


mrhaw
Posts: 1,937

modx == freedom

WWW
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+]

My playground: http://4up2date.info | Twitter: mrhaw
---> Check out: ReadSpeaker webReader Plugin | Support/Comments Thread

--=[ MR. HAW ]=--

#5: 23-Dec-2008, 10:49 PM

zeio
Posts: 29

Thankyou again MrHaw

Worked just perfectly

Cheers from Josh

 Smiley
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.