Open cookie10codes opened 1 week ago
That's strange, I can't seem to replicate that. So there's literally no other settings changed apart from the location to upload? And these files show up as soon as you load the form on the front-end?
hi @engram-design,
Sorry was a bit of a short turn there. I do have a populate fields object, but the cv (which is the handle of the field) has null in it (the idea is that I read the field from the user CV upload and add it populated in there, currently I just pass null)
{%- set populateFields = {
about: user.about,
email: user.email,
firstName: user.firstName,
lastName: user.lastName,
jobTitle: user.jobTitle,
telephone: user.telephone,
inss: user.inss,
about: user.about,
cpUserId: user.id,
cv: null,
} -%}
Ah right, that might be problematic, not to mention that won't work anyway. Firstly, that's going to load up the Asset element query with a null
ID, so it's going to fetch all assets. I can add a check for that.
Secondly, you can't populate a FIle Upload field like this, because the <input type="file">
cannot be populated as a browser restriction. We want to get around this by implementing a drag drop field at one point.
Describe the bug
When I use a File Upload, the field shows all the uploaded file ons the project. I don't see anything specific in the settings and don't do anything specific.
Steps to reproduce
But I see all the files on all folders listed out
Form settings
Craft CMS version
Craft Pro 5.2.0
Plugin version
3.0.0-beta.15
Multi-site?
No
Additional context
No response