Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-11-20 10:44:53

alosa
New Member
Registered: 2008-03-14
Posts: 7

Add file upload to contact form?

Hi,

I’m doing hiring form to my client site. I’m wondering how can I add file upload(resume) to standard contact form? I’ve been using zem contact earlier.

Thanks.

Offline

#2 2009-11-20 16:58:46

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Add file upload to contact form?

What do you mean by “standard contact form”?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2009-11-21 07:55:54

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Add file upload to contact form?

I don’t think it is possible but you could use afu instead.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2009-11-23 06:39:15

alosa
New Member
Registered: 2008-03-14
Posts: 7

Re: Add file upload to contact form?

Simpy, I want that my website visitor can send me a file (pdf/doc) + some additional info like name, phone and email.

Offline

#5 2009-11-23 08:04:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: Add file upload to contact form?

You could use mem_form which has file upload support and works very similar to zem_contact_reborn. Another way would be to use jquery uploadify to upload a file while in your zem_contact_reborn form and then return a reference to the filename to your email submit form. You have to do manual js/php work for that as it is not a textpattern function.

You should note that having a publicly available file upload field is a security risk. At the very least you should direct file uploads to a safe directory outside of your site and make this directory non-executable and non-reachable from outside (mask the name of the upload directory and rename uploaded files to something else) so that people cannot upload malicious or inappropriate content files and then execute them or reach them from outside. If you are only accepting certain file types, reject other file types (testing just the filename extension is not sufficient) and so on. The article linked to describes the main problems.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2009-11-23 08:07:52

alosa
New Member
Registered: 2008-03-14
Posts: 7

Re: Add file upload to contact form?

Thanks Jakob. mem_form looks promising. I think it’s something I’ve been looking for.

Offline

#7 2015-05-11 07:05:40

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: Add file upload to contact form?

Hi, I need to add option of sending image by mail to zem_ contact_reborn. I understand that ZCR doesn’t have this functionality. I couldn’t find mem_form plugin recommanded above, nor could I find any documentation of it. Is this plugin still living? Maybe there is a newer solution for sending images with web mail form? Thanks

Offline

#8 2015-05-11 08:20:23

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Add file upload to contact form?

mem_form seems to be available here

Offline

#9 2015-05-11 11:09:27

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: Add file upload to contact form?

There are newer mem_forms in Michael’s own Bitbucket.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2015-05-11 13:43:42

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: Add file upload to contact form?

Sorry guys, but I can’t figure it out.
I installed the plugin, acitvated it and added a simple code to test:

<txp:mem_form >
      <txp:mem_form_text label="Fotka"/>
   </txp:mem_form>

It says <txp:mem_form > is nonexistent tag. What is wrong?

Last edited by dorka (2015-05-11 13:45:06)

Offline

#11 2015-05-11 14:58:47

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Add file upload to contact form?

Did you activate the plugin?
Probably not relevant, but remove the space between mem_form and the >

Offline

#12 2015-05-11 18:36:02

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: Add file upload to contact form?

Hi Ruud,
yes it is activated. I removed the space, too, but it doesn’t make any diference.

Offline

Board footer

Powered by FluxBB