I’ve created a simple form that saves data to the website.
These user submitted files contain some simple text information, I’ve used .yaml but another file format might be more relevant here:
The username shows the user that submitted the post; the text file is what they submitted in the form.
====
What I want to do is a bit of an adventure, but here goes…
I’d like to look through these folders & files to find all the posts made by the current user. Once found, I want to output the text field into a html webpage, I think using a for each loop of some sort. The result should be a webpage that acts as a dashboard for the users submissions. With the following structure:
I’d appreciate any advice, from code snippets, to better ways to go about achieving it. It’s pretty complicated, but if I can figure it out I’d like to later provide some video tutorials about how the process works to help other Grav users.
Currently the username can’t be added to the filename, which might help, but I’ve submitted it as a request to the form developers.
To cut processing time, it might also be better if the posts could first be grouped into user folders. That way rather than scanning 50 files for the username, it could just find all the files in one folder with the username. Loose ideas, but would appreciate any feedback and thought.