ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Contact form file upload and captcha not working

October 28, 2011 7:52am

Subscribe [3]
  • #1 / Oct 28, 2011 7:52am

    kate1975

    11 posts

    Hi,

    I’m kind of new to EE and I’ve gotten a simple contact form to work. Today I tried to add and input=“file” field and the attachment doesn’t arrive in my inbox even though I can select it on the front end part of the site.

    The other issue is that Captch doesn’t produce an image on the front end. I enabled it in admin>email configuration. But it’s still not working.

    Here’s my code for the form if any has an idea? It could be quite simple. I’m just more of a designer than a programmer. Here’s the site too: http://www.drinkyourcarbs.com/site/success/share

    {exp:email:contact_form user_recipients="false" recipients="[email protected]" charset="utf-8"}
       <fieldset id="contact_fields">
    
       <label for="name">
        <span>Your Name:</span>
        <input type="text" id="name" name="name" value="name" />
       </label>
       <label for="from">
        <span>Your Email:</span>
        <input type="text" id="from" name="from" value="email" />
       </label>
    
       <label for="subject">
        <span>Subject:</span>
        <input type="text" id="subject" name="subject" size="40" value="Share my Story" />
       </label>
    
       <label for="message">
        <span>Message:</span>
        <textarea id="message" name="message" rows="40" cols="40" size="60">Sent at: {current_time format="%Y %m %d"}</textarea>
       </label>
    
       <label for="photo" >
       <span>Upload photo:</span>
           <input type='file' name="photo" id="photo" value="upload photo" />
       </label>
       <label for="captcha" >
       <span>Captcha:</span>
       Please enter the word you see in the image below
            <input type="text" name="captcha" value="" maxlength="20" /></p>
       </label>
       </fieldset>
       <fieldset id="contact_action">
        
        <input name="submit" type='submit' class="button" value='Share' id='contactSubmit' />
    We will never pass on your details to third parties.
       </fieldset>
    
        
    
       {/exp:email:contact_form}
  • #2 / Oct 28, 2011 8:55am

    kate1975

    11 posts

    A little update. I managed to get the Captcha image to show up. I’m still experiencing problems with the uploaded image not arriving with the email.

  • #3 / Oct 28, 2011 6:39pm

    Kevin Smith

    4784 posts

    Hi Kate,

    Welcome to ExpressionEngine and to the forums! Glad you were able to get the Captcha working.

    The EE contact form doesn’t actually support attachments, but the Freeform add-on does. In your situation, I would recommend that add-on instead.

    And since you’re new to EE, let me introduce you to Devot://ee, our community partner. Devot:ee hosts a comprehensive catalog of EE add-ons as well as a store for purchasing many of the commercial add-ons that are available.

  • #4 / Oct 28, 2011 7:07pm

    kate1975

    11 posts

    Thanks for your reply. Since posting I came to the conclusion that Freeform is the way to go. It’s great and everything works.

  • #5 / Oct 29, 2011 9:20am

    Mark Bowen

    12637 posts

    Hi kate1975,

    Glad that you’re all sorted now. Thanks for letting us know.

    If anything else crops up then please don’t hesitate to post again as needed.

    Thanks,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases