This project is read-only.

Attach file to form

Topics: Troubleshooting
Jun 4, 2015 at 12:53 PM

I have begun to learn Orchard, and I have been tasked to make an form that can attach an CV file.

I have search for an module to solve this problem, and found FileField for Orchard 1.8. But I am not sure if it works on Orchard 1.9.

I find very few documentation on this matter. I tried to add a "content picker" field to an custom form, but when i click on it, it only shows the content on the Orchard site (pages, entries etc).

Do any of you know how to implement such a form, that can attach a file from the users computer, to the admin panel?

Help really preciated!
Jun 4, 2015 at 1:28 PM
The FileField module is a content field that can be used with the Orchard.CustomForms module, but has been deprecated in favor of the new Orchard.DynamicForms module. So you can still use it, but it will go away at some point.
Ideally you would implement a FileField element that works with DynamicForms. But if you're new to Orchard, perhaps the easiest thing to do is implement your own controller that renders your form and handles the form submission. The downside of this approach is that you can't configure the form from the dashboard. But perhaps that's not even a requirement.
Jun 4, 2015 at 1:44 PM
Edited Jun 4, 2015 at 1:47 PM
Thanks for your time and answer!

Forgive my beginner questions, but what are a content field supposed to do? I was hoping it would show a certain kind of files on the users computer (in my case, PDF files).

So the FileField module (downloaded from here: ) can still be used for my task? Do you happen to know of a documentation on how to use it? I am bit lost right now.

Edit: The user are not allowed to configure the contact form. He or she are only allowed to write in it, attach his/her CV file, and then submit it.
Jun 4, 2015 at 2:13 PM
No worries.

Content Fields are things you attach to Content Parts, which in turn are attached to Content Types.

I have never used the FileField module myself, but from what I understand it was created to enable site visitors to submit a form including a file attachment.

Custom Forms enable you to create your forms by means of creating a custom content type which holds all sorts of fields, for example First Name and Last Name.
When rendered on the front end, the visitor would only be able to fill out the form. When submitting the form, a content item would be created.

There's some documentation on Custom Forms here: