Store a static reference to file in results

Created on 24 May 2024, about 1 month ago

This module seems to work great, thank you for creating it.

Seeing as our file changes version regularly enough, I'd like to be able to store the filename in the results table at submission time.

It seems that the [webform_submission:protected_download_url] token is only available post-submission and gets stored as a string when entered into e.g a hidden field.

I've also tried a few combinations of [webform:handler:?] however have not got anything to work.

I realise this may require something custom yet, to grab the filename from somewhere and insert it into the results at submission time, but thought I'd ask the question first in case there's a simple answer.

Thank you.

✨ Feature request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡¬πŸ‡§United Kingdom kiwimind

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kiwimind
  • πŸ‡¬πŸ‡§United Kingdom james.williams

    Thanks, good question ... I don't believe this is currently possible, as yes, the token is currently only available once the submission exists - which is after hidden fields are built or populated. So at the moment custom code would be necessary. But if you or anyone else wants to have a go at implementing this ability into the module codebase, I can see the value and would accept it & help with getting it in place! It wouldn't necessarily need to use tokens either; fundamentally you just want to be able to reference the file that was available at the time of submission, so that when the file or handler config changes, the reference or value in the submission is unchanged.

  • πŸ‡¬πŸ‡§United Kingdom kiwimind

    Thanks very much for the prompt response.

    I'll have a think about this. If there's time on this project then I may well have a crack, otherwise we may have to rely on revisions by date.

Production build 0.69.0 2024