Is it possible to add a File upload field to the contact form and have the file that gets uploaded attached to the email thats sent or even stored in the Umbraco back end somewhere?
Yes it's possible but I currently have no time to explain in full.
Use <input type="file" multiple /> and handle the uploaded file(s) something like this:
//For each file posted, create a new Image in the media section
for (int i = 0; i < Request.Files.Count; i++)
{
HttpPostedFile file = Request.Files[i];
if (file.ContentLength > 0)
{
//Do something with the file
}
}
I would strongly recommend you use Contour as that is all built in already and super easy to set up, this package is already a pretty big hack and pretty difficult to extend.
Thanks for the feedback. I would go for Contour but I can't justify the 120 Euros’ to the client just so he can allow people to add documents to the basic contact form on his site. Maybe if there is scope to fully utilise contour in the future...
Adding an upload field.
Is it possible to add a File upload field to the contact form and have the file that gets uploaded attached to the email thats sent or even stored in the Umbraco back end somewhere?
Regards,
S
Yes it's possible but I currently have no time to explain in full. Use
<input type="file" multiple />
and handle the uploaded file(s) something like this:I would strongly recommend you use Contour as that is all built in already and super easy to set up, this package is already a pretty big hack and pretty difficult to extend.
Thanks for the feedback. I would go for Contour but I can't justify the 120 Euros’ to the client just so he can allow people to add documents to the basic contact form on his site. Maybe if there is scope to fully utilise contour in the future...
Regards,
S
is working on a reply...