[Pro] Adding attachments in forms

Hi ,

Is here an easy way when creating a form/extending a form so that the user can add an attachment, in the kind of way you would attach a CV or covering letter?

I have the form working well, would just like to add this extra bit of functionality.

Any help greatly appreciated.

Russ


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Adding a file input to a Freeway-generated form is easy. Insert a normal Text input where you want the file input to appear, then while that text input is selected, use Item / Extended to add a new attribute to the field:

  • Name: type
  • Value: file

But that alone will not solve the entire problem. Next, you have to alter your form so it can enclose file inputs. In the File Setup dialog, click on Extended, and add the following attribute:

  • Name: enctype
  • Value: multipart/form-data

But wait, you’re still not done! Now your form handler needs to know what to do with the uploaded file data. If you are using PHP Feedback Form to handle your form input, it does not include that feature – by design. File uploads are an easy target for hackers, so you have to know how to sanitize and quarantine those uploaded files, and Tim quite sanely does not want to get in the middle of that mess.

Forms To Go will generate a file-handling form processing script, and you can follow their directions (and pay for the application) to get this to work. But I still don’t recommend this for a newcomer to scripting or programming. It’s just too easy to bore a hole through all of the security on your server, and either facilitate taking down your server or another site on the same physical box.

Walter

On Jul 9, 2012, at 8:51 AM, Russ wrote:

Hi ,

Is here an easy way when creating a form/extending a form so that the user can add an attachment, in the kind of way you would attach a CV or covering letter?

I have the form working well, would just like to add this extra bit of functionality.

Any help greatly appreciated.

Russ


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Waltd,

That makes perfect sense. I will check out a couple of security/sanitation solutions and worse case scenario as the form filler to attach a file to an email and have an email response – but I have noted the solution.

Many thanks

Russ


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options