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.