Adding a newline character to a string

Hi team,

I have been trying to tidy up some code on my site and I’m having trouble adding a newline character to a string. The code I’m trying is below. The code works but doesn’t put each string on a new line. The data is within a repeater hence $item

let helmetInfo = $item('#helmetCheckBox').checked ? "✓ Helmet • " : "✗ Helmet • ";
let harnessInfo = $item('#harnessCheckBox').checked ? "✓ Harness • " : "✗ Harness • ";
let shoeSize = $item('#shoeSize').value;
let shoesInfo = $item('#shoesCheckBox').checked ? "✓ Shoes  - size " + shoeSize : "✗ Shoes";    
        
        participantSizeData  = "Equipment size " + equipmentSize + "\n" +  helmetInfo + "\n" + harnessInfo + "\n" + shoesInfo;

Anyone got any ideas?

Stephen

When testing this the code seems to work when passing to a simple #textBox but when passing to send the data to SendGrid it doesn’t seem to work…

Outcome in the email via Sendgrid

Hi Stephen, I use SendGrid too, instead of “\n” I just use “
” and it works for me :slight_smile:

@verbaldancing Legend! Thank you very much :slight_smile: