- πΈπΎSyria alsammanKhaled
Hey, I am facing an issue with referring computed twig elements into one.
I have 3 computed twig elements that i want to get their total using computed twig.
The moment i try to follow{% set test1= webform_token('[webform_submission:values:test1]', webform_submission) %} {% set test2 = webform_token('[webform_submission:values:test2]', webform_submission) %} {% set test3 = webform_token('[webform_submission:values:test3]', webform_submission) %} {{ test1 + test2 }}
I get the following error "Wrong operant string + string".
Another main issue is that I can't edit the 'total' computed twig anymore. even from the YAML tab. I will have to delete the element and try again differently.I also tried
{{data.test1 + data.test2 + data.test3 }}
Also{% set total= total + webform_token('[webform_submission:values:test1]', webform_submission) %} {% set total= total + webform_token('[webform_submission:values:test2]', webform_submission) %} {% set total= total + webform_token('[webform_submission:values:test3]', webform_submission) %} {{total}}
I get the same issue as wrong operant. if i am using the "Test" tab i can see that the form is actually working properly. but the moment i go to "Result" or "View". I get the errors.
Any help would be much appreciate it. If there is more info required i can provide.
I am using Drupal 9.5