Frontend From File Upload

Hi all,

I am having great problems with file upload on a front end form. I have installed the Ladio skeleton and modified the 01.home/modular.md as follows:

---
title: Landio
menu: Home
form:
    name: my-nice-form
    action: /home
    fields:
        - name: name
          id: name
          label: Name
          classes: form-control form-control-lg
          placeholder: Enter your name
          autocomplete: on
          type: text
          validate:
            required: true

        - name: email
          id: email
          classes: form-control form-control-lg
          label: Email
          placeholder: Enter your email address
          type: email
          validate:
            rule: email
            required: true

        - name: myfile
          label: My File
          type: file
          multiple: false
          destination: 'self@/files'
          accept:
            - 'image/*'

    buttons:
        - type: submit
          value: Submit
          classes: btn btn-primary btn-block

    process:
        - email:
            from: "{{ config.plugins.email.from }}"
            to:
              - "{{ config.plugins.email.from }}"
              - "{{ form.value.email }}"
            subject: "[Feedback] {{ form.value.name|e }}"
            body: "{% include 'forms/data.html.twig' %}"
        - save:
            fileprefix: feedback-
            dateformat: Ymd-His-u
            extension: txt
            body: "{% include 'forms/data.txt.twig' %}"
        - message: Thank you for your feedback!
        - display: thankyou


onpage_menu: true
content:
    items: @self.modular
    order:
        by: default
        dir: asc
        custom:
            - _intro
            - _features
            - _video
            - _pricing
            - _testimonials
            - _text
            - _news
            - _contact
---

The file upload field displays fine on the front end but nothing actually uploads and nothing is attached to the subsiquent email. I am really unsure how to go forward from here.

Thank you.

did you try another folder, check permissions ?

Hi dimitrilongo

I have tried many different folders and I don’t think it’s a permissions issue as I am using localhost.

Hi,

I have the same problem, did you find any solution

Thanks.

I suggest using the latest Grav 1.6.x version.

The cause is not likely to be with Grav core or the Form plugin. Whilst developing my Add Page by Form Plugin I’ve tested uploading to a great extent over the past years.

Form issue #116 appears to be very persistent but is not relevant in your case by looking at your form definition frontmatter you posted.