@████████
I just want to confirm that there is no way to reuse the clickable blob url from the upload field. I want to break out all batch upload docs into a table where a user can add additional info in adjacent columns such as vendor name, invoice number, etc..
I can use vanilla javaScript to put the url in there and even make it clickable but the blob is sanitized and will not open. I had to use a button within a customHTML field.
What would be even better would be to use the preview url and put that in my table but that is not exposed in the array returned on the upload field with getFrieldValues.
I am trying to avoid users uploading to the repository and then starting the business process from there since I'll need to manage duplicate docs and cleanup. That seems counterintuitive to how Forms works, but I don't see another option. Please let me know if anyone has paved the way on this before :) Thanks!
preview button:
As far as i could get:
Discussion
Discussion
Forms 12 reuse upload blob or preview url
not directly unfortunately, like you saw we sanitize the blob url for security purposes. You could line up the table and the file upload side by side and use CSS/JS to keep the two in sync though. I haven't done the JS portion, but this is kind of what it would look like.
Gotcha, I hate to resort to uploading to the repo but that's what I did on this one...
I like the look of the side by side table. Can the LFForm object hide the misc upload artifacts like file size? I absolutely LOVE the preview feature on the upload field. Super useful.
Well on the positive side, we want to enable forms to more seamlessly open entries saved from a form to the repository so that will be the best way in the future. Your actual use case is super common, people filling out forms don't want to upload to each row of a table they want to do it all at once.
LFForm can't hide the upload information, but you can hide it with CSS. The easy way is display: none; but if you're worried about accessibility and screen readers (working on a presentation for empower), you can use these styles to visually hide them, but make sure a screen reader can still read the information.
border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; white-space: nowrap;
@████████,
Great news, I got this going very well at the form level. JS is pulling the ID from each upload doc and puts it in the adjacent table. When a file is 'Removed' it checks the table and removes any rows that no longer exist. Pretty cool stuff :) Thanks again for the suggestion.
I need to confirm with you something about the order that upload files save. When I get to the next step which is Workflow, things get a little tricky. Workflow and forms do not have an option for the ID from the upload file, so I tried something and it seems to be working. Here is the $10M question:
Does the upload field always save to the repository in the order of top down? In other words the top-most upload doc has the lowest entryID and the bottom-most has the highest entryID?
This seems to be true and is working, but I want to confirm this how it will always work so I can build on top of this functionality. Or, do you have a better, more reliable recommendation?
PS, I am using version 12 and may have found a bug. I put it in a separate post.
Thanks!