How to add a "attach image feature to a contact form"


#1

Hi Everyone

I have brought Mattis Photography Wordpress Theme which uses a PHP contact form

The form works great but I needs to add a feature, to allow people visiting the site the option to add a image to the form before clicking on the submit button

I thought I found the solution looking at this site

I know the code I need to add to the form starts with something like this

File Upload
(1 file only, max file size 1024kb. Allowed file formats are .doc, .pdf, .zip, .rar)

<p><input type="submit" name="submit" id="submit" value="Send Email!"  tabindex="8"/></p>
<p><input type="hidden" name="submitted"  value="true" /></p>
</form>

But I am not to sure about the rest, when the user clicks on submit all of the form including the attached image needs to be emailed.

Does anyone have a idea of the rest of the code should be…

any help appreciated

Michael


#2

I’d recommend using a plugin like Contact Form 7 as it might be easier to get working:

They have specific instructions on how to get the file upload portion working:
http://contactform7.com/blog/2009/11/24/file-uploading-and-attachment/


#3

Thank you

I managed to get it to work…

:slight_smile: