Search

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

Take a aection named Images with fields:

  • Title - TextBox
  • Image - 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.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details