Hello everyone,
I’m having a problem uploading files within the fori loop. We created a fori list where users can add a text comment and upload a file. When a user enters a text comment, everything works fine and the comment appears only in that tab. However, when a user uploads a file, it appears in all of the file upload tabs within that category (The creation of a new category in the fori works fine, the only problem is that the file uploads in both ‘file_upload’ and ‘file_upload2’). The keys of the customs are unique.
You can test it out with the following code (when uploading a file, you see the problem) :
{% fori item in custom.comments %}
The first comment and file: {% input item.textual_comment %}{% input item.file_upload as:file %}
The second comment and file: {% input item.textual_comment2 %}{% input item.file_upload2 as:file %}
{% endfori %}
- Hopefully anyone can explain why this does work for the textual input but doesn’t work for the file input.
- Does anyone have a solution to this problem?
- We already thought about making a ‘normal’ custom input (with a assigned variable) for the files, but this would empty the existing uploaded files for non-closed customers.
Thanks in advance for you r time!