I am making an attempt to set off Ajax calculations inside a loop in a computed twig subject.
When making an attempt to name my fields in a loop, it doesn’t set off the recalculation, so the shape just isn’t up to date throughout person interplay.
The loop works… however the webform_token
‘s should be referenced at the very least as soon as beforehand, like: webform_token('[webform_submission:values:field_key]', webform_submission) | slice(0,0)
then I see the updates from my loop operate whereas interacting with the shape.
{% for merchandise in parts %}
{% if merchandise['#type'] == 'radios' %}
truncate(64)
{% set webformToken = webform_token('[webform_submission:values:' ~ fieldKey ~ ']', webform_submission) %}
{% if (webformToken in merchandise['#options']) %}
{% set completedCount = completedCount + 1 %}
{% endif %}
{% endif %}
{% endfor %}
Is there a technique to set off a recalculation contained in the loop? With out having to reference the fields beforehand? Hoping to have the pliability of not wanted to explicitly name every subject by title.