How can I combine multiple text fields so their contents fill the text box of the SendGrid API?

This forum contains topics that were moved from Get Satisfaction
Preston To
Posts: 0
Joined: Thu Jun 18, 2015 12:35 pm

How can I combine multiple text fields so their contents fill the text box of the SendGrid API?

Post by Preston To »

Could someone please look into it? The problem still exists.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How can I combine multiple text fields so their contents fill the text box of the SendGrid API?

Post by Alena Prykhodko »

Hello Preston,

Still no news, we'll update as soon as have reply here.

Pavel Zarudniy
Posts: 0
Joined: Mon Jul 06, 2015 8:56 am

How can I combine multiple text fields so their contents fill the text box of the SendGrid API?

Post by Pavel Zarudniy »

Hi Preston,
You can use replace function to remove unneeded \n
code
return fullText.replace("\n", "");
/code

Preston To
Posts: 0
Joined: Thu Jun 18, 2015 12:35 pm

How can I combine multiple text fields so their contents fill the text box of the SendGrid API?

Post by Preston To »

Hi Pavel,

This workaround seems to do it for now, thanks!

Preston To
Posts: 0
Joined: Thu Jun 18, 2015 12:35 pm

How can I combine multiple text fields so their contents fill the text box of the SendGrid API?

Post by Preston To »

Another question, the generated email in my app formats the 3 text components like this:

"Username" "Product" quantity

for example:

"Preston" "ProductXYZ" 16

Weirdly, the last component doesn't have any quotation marks around it. I want to unify the formatting, either with all 3 components having quotation marks or no quotation marks at all.

Using return fullText.replace(""", " ") obviously won't work.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How can I combine multiple text fields so their contents fill the text box of the SendGrid API?

Post by Yurii Orishchuk »

Hi Preston,

You can use following JS code:

pre

return fullText.replace(/"/gi, "");

/pre

Regards.

Post Reply