Hi,
I’m trying to create a new subfolder for each form submission to help me manage the data.
Currently my form is saving both the text data and the uploaded files in the same general folder.
This is my code :
title: Report problem
form:
name: report-problem
fields:
street-number:
label: Street number
type: text
validate:
required: true
street-name:
label: Street name
type: text
validate:
required: true
custom_file:
name: myfile
type: file
label: A Label
random_name: true
destination: 'C:/xampp/htdocs/grav/grav-admin/user/data/report-problem'
multiple: true
autofocus: false
accept:
- image/*
buttons:
submit:
type: submit
value: Submit
reset:
type: reset
value: Reset
process:
- message: Thank you for your feedback!
- save:
fileprefix: contact-
dateformat: Ymd-His-u
extension: txt
operation: create
body: "{% include 'forms/data.txt.twig' %}"
- reset: true
So every submission is saved in the following folder : user/data/report-problem
Is there a way to save each submission in a different subfolder ? For instance, the data for one submission would be saved in the following path : user/data/report-problem/sub1
And the following in : user/data/report-problem/sub2