- Issue created by @spivey
webform_token can return an array. That would explain what you are seeing. I think this is a support request.
Can you limit that code to the first line that throws the TypeError? I think it could be the first line.
- πΊπΈUnited States spivey
I'm not sure what you mean by that, but I changed the code in the "Computed Field/ Markup" to only have:
{% set startDate = webform_token('[webform_submission:values:start_date_and_time:raw:clear]', webform_submission) ?: 0 |date('d.m.Y H:i:s') %}
Filled the form out and received the same errors.
I believe
webform_token('[webform_submission:values:start_date_and_time:raw:clear]', webform_submission)
is returning an array, which it may well do. And that would cause exactly this TypeError. I do not see how this represents a bug in webform.- πΊπΈUnited States spivey
I see the logic in not classifying it as a bug however I do not this is supposed to work how it is working. I've updated this is issue to reflect it is not a bug however I'm still not clear on how to solve the problem.
What is the datatype you are passing to
|date
? All evidence is that it is an array.- πΊπΈUnited States spivey
The only datetype that should be in use is whatever datatype the Date/ Time element uses. I'm not using any custom fields or elements from outside Webforms.
- Status changed to Closed: outdated
10 months ago 1:48pm 29 January 2024