1

I have a Matrix with a block for a contact form. I have a field for the email recipients. But the output doesn't work.

How can I render/output the output a tag within another tag, like this?

<input type="hidden" name="toEmail" value="{{ '{{item.mailto}}'|hash }}">
3

You are hashing the string '{{item.mailto}}'. There shouldn't be any need for the quotes or second set of curly braces.

Twig does not permit curly braces inside curly braces.

Try {{ item.mailto|hash }} instead.

  • {{ item.mailto|hash }} work's fine. Thx – The Frog Sep 26 '16 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.