I'm trying to configure email confirmations that are sent out by one of our web forms. At the moment they are appearing without line breaks but I want to be able to have line breaks between certain strings.

At the moment one of our vendors hosts and designs our site, so we have have limited access to edit and configure.

Is it possible to do what I want in the body?

**we are using Drupal 7. **below is a screenshot of what I have the ability to edit.

enter image description here

1 Answer 1


In the Twig documentation, there is an entry that can help you out: https://twig.symfony.com/doc/2.x/filters/nl2br.html

{{ "I like Twig.\nYou will like it too."|nl2br }}

will output:

I like Twig.<br />
You will like it too.

So inside a string, you could use \n or the function nl2br at the end of it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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