Page 2 of 2

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

Posted: Wed Jul 15, 2015 12:30 pm
by Preston To

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


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

Posted: Wed Jul 15, 2015 1:10 pm
by Alena Prykhodko

Hello Preston,

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


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

Posted: Thu Jul 16, 2015 8:02 pm
by Pavel Zarudniy

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


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

Posted: Thu Jul 23, 2015 7:45 am
by Preston To

Hi Pavel,

This workaround seems to do it for now, thanks!


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

Posted: Wed Jul 29, 2015 6:55 am
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.


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

Posted: Thu Jul 30, 2015 2:39 am
by Yurii Orishchuk

Hi Preston,

You can use following JS code:

pre

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

/pre

Regards.