I have a project where my client wants the ability to create the occasional ‘Public Submission’ (they’re a government department). There would be two components to the solution, a channel for the Public Submission details, and another channel for the actual submissions made by the general public.
‘Public Submissions Information’ Channel Fields:
- Title
- Body [WYGWAM]
- Show ‘Text Comment’ field [Checkbox]
- Image [File]
- Upload Directory [*** This I’m not sure about]
‘Submissions by Public’ Channel Fields:
- Title (generated)
- Name [Text]
- Email [Text]
- Comment [Text Area]
- Upload File [File]
I will use the ‘Public Submissions Information’ channel to drive the generation of the form itself, but with regards to the ‘Upload Directory’, my clients needs to be able to have a unique directory per entry and choosing this within the entry, and then having the ‘Submission by Public’ channel honour the upload directory information is problematic.
The alternative could be to use Freeform, whereby there’s a ‘file_upload’ parameter which can be used, but still requires the content admin to create a new ‘File Upload’ preference.
Maybe I’m overthinking it, and there doesn’t need to be a separate upload directory for each Public Submission run. I could use a single directory, but I’d want to prefix the files uploaded with a different name. Is this possible to do on the fly using some form of data such as the ‘url_title’ of the ‘Public Submission Information’ entry.
Any suggestions are welcome.
Thanks
Brendan