Uploading file from the frontend
This is an open discussion with 2 replies, filed under General.
Search
Take a aection named Images
with fields:
Title
- TextBoxImage
- Upload
Using a classic Event, this should be your form to change the Image
field value for entry 1234
:
<form action="..." method="post" enctype="multipart/form-data"> <input name="fields[image]" type="file"/> <input name="id" type="hidden" value="1234"/> </form>
If you want to keep Image
field value unchanged in that form, you have 2 options:
1. You do not submit field[image]
value b/c editing an entry will update only fields that are submitted.
2. You submit the path to current file. Eg:
<input name="fields[image]" type="hidden" value="{image/@path}/{image/filename}"/>
Hi, Just bumping on this thread.
I've added a file-upload to the default Messages Section (called upload) and it works just fine. However, that's when I only include this:
<input name="fields[upload]" type="file"/>
Is it possible to attach an image to the send email? Or at least a 'value=true' type thing so I can tell from my email inbox?
Create an account or sign in to comment.
Hallo,
I'm looking for a way to implement a file upload, but in the events I cannot find anything related. I guess I have to pair the form with the section, but something is missing...
Thanks for any suggestion