My site requires contacts form which allow users to attach files with messages. I was using very good plugin by Ryan Wp-ContactForm for a long time but it doesn’t support file attachments.
As I understood from searching on google many people need same thing on their sites. So, I decided to hack Ryan’s version and add attachments feature.
Please note: This is temporal hack because I’m sure Ryan will add same functionality in next versions. Also, all credits should go to the original plugin author because my hack is only 15 php strings.
This hack doesn’t provide any additional options in to admin panel. But you can setup the maximum size of attached files:
Go to wp-contactform.php and change the value of $attachment_max_size parameter. Note: it should be set in KB.
I have add 3 file upload fields, but you can change their number. Just go to wp-contactform.php, file fields starting from line 214. Simply add or remove them. Do not forgot to setup different NAME attribute for every field you add.
Just upload to /plugins/ folder and activate.
Create a post or a page and press the Contact Form quicktag where you want the form to be. If you don’t see the Contact Form quicktag, you can alternatively copy and paste <!–contact form–> where you want it to appear.
For more information about original plugin and installation help go to Ryan’s page.
P.S. Don’t have time for fixes, so, I just archived the version from my server which works fine.