Problem/Motivation
the :clear functionality is undocumented, without it tokens are not getting replaced/substituted when the element has no value
Steps to reproduce
add a field to a webform of type managed_file , allow N values, optional field, if no file is uploaded the token shows up in the submission email, we do not want to render the token in the submission email so we want to substitute the null value with '' empty string instead of the token it'self
Proposed resolution
Add a note about how this functionality works in the README.md
Remaining tasks
Add a patch for the README.md file
review the patch, not sure if this is an appropriate solution or if it will cause regressions.
User interface changes
N/A
API changes
no
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | Screen Shot 2020-08-27 at 6.37.50 PM.png | 166.87 KB | jrockowitz |
Comments
Comment #2
joseph.olstadhere is the patch
Comment #3
jrockowitz commentedPlease append
:clearto the token (i.e.[webform_submission:values:file:clear])Comment #4
joseph.olstadah ok, good to know, so this patch isn't necessary then?
Comment #5
joseph.olstadok marking this as fixed unless otherwise , I will test :clear
Comment #6
joseph.olstadComment #7
jrockowitz commentedThis feature is documented under the Token help/description.
Comment #8
jrockowitz commentedComment #9
joseph.olstadok thanks for the heads up, I didn't see a README.txt but perhaps I didn't look hard enough, I saw the README.md and it wasn't there. So it looks like you put the instructions in code. With that said, great work! Thanks for the support!