The client wants to be able to check and edit the data gathered through the form, so I created a structure field in the Panel that shows the data from registrations.txt and rewrites the file if the client edits it through the Panel.
I would like the user to be able to get this file in CSV format (from the Panel), but I don’t know how to do it. The user can’t even download /content/registrations/registrations.txt because this file doesn’t get listed in the “Files” section.
You guessed it, I have never created a widget, but I will give it a try.
Besides that, I will have to create a function to actually convert the YAML into CSV. I’m not a programmer, so it feels like my brain is overheating. Is there a premade function to do that in Kirby? If not, could you give me a clue?
I’m trying to use f::write to write the file test.csv not to the /assets folder but to the content/registrations folder . That way the file will appear in the file section of the Registrations page in the Panel.
However, I don’t find the way to do that. This, for example, is not working: