Hello all. I am new to working with macros and Kentico. I have a form that has a multiple choice fie

Jonathan Willett asked on September 30, 2022 14:40

Hello all. I am new to working with macros and Kentico. I have a form that has a multiple choice field where you can choose more than one option. In the form's notification email, I have the multiple choice value printed. Right now if multiple choices are selected the output is listed horizontal. How can I get it so each choice selected is printed vertically?

example:
What I get now: multiple choice: Option A, Option B, Option C

My desired outcome:

multiple choice:
Option A
Option B
Option C

Thanks!

Recent Answers


Trevor Fayas answered on October 25, 2022 03:46

You may be able to do {% TheMultipleChoiceField.Replace("\n\r", "<br/>") @} and see if that works...

0 votesVote for this answer Mark as a Correct answer

Jonathan Willett answered on October 25, 2022 15:21

That did not seem to work.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on October 25, 2022 15:33

Sorry, try this

{% TheMultipleChoiceField.Replace(",", "
\n\r") %}

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.