We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33431
    • 29 Posts
    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=`[email protected]` &tpl=`counter` &report=`feedback` &vericode=`1` &subject=`SendUs`!]

    Chunk Name: counter



    [+validationmessage+]
    <form id="hmm" method="post" action="[~[*id*]~]">
    <p><label accesskey="n" for="Name">Your First & Last Name</label>

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

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

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

    <textarea cols="23" rows="11" name="comments" eform="Comments:html:1"></textarea></p>
    Please enter the code below then press send:
    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>



    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

      • 20413
      • 2,877 Posts
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 33431
        • 29 Posts
        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>

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

        <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
          • 20413
          • 2,877 Posts
          Quote from: zeio at Dec 23, 2008, 09:43 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>

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

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

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

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

            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 33431
            • 29 Posts
            Thankyou again MrHaw

            Worked just perfectly

            Cheers from Josh

            smiley