I have a webform with a Document File field. In my twig email template, I want to test if that field is empty. For text area fields for example, this syntax works :
{% if webform_token('[webform_submission:values:question_text_area:value]', webform_submission) %}
<br>
<table>
<tr>
<th>Questions</th>
</tr>
<tr>
<td>{{ webform_token('[webform_submission:values:question_text_area:value]', webform_submission) }}</td>
</tr>
</table>
{% endif %}
But for a Document File field, the same syntax does not work, meaning that if no file is uploaded, that part of my template is still printed.
I tried
{% if webform_token('[webform_submission:values:join_a_file:value]', webform_submission) %}
or
{% if webform_token('[webform_submission:values:join_a_file:value]', webform_submission) is not null %}
or
{% if webform_token('[webform_submission:values:join_a_file]', webform_submission) is not null %}
and none of them work.
Does anybody know the proper syntax for what I'm trying to do? Thanks!