Hi
I made a form with sendGrid with following "Wix support codes"
https://support.wix.com/en/article/how-to-send-an-email-on-form-submission#modifying-the-code
I did not change the codes.
However, when the user type ";" or "&" or presses enter to make a new line in any text input, the generated email is cut after the first typed character until the end. But, the text is saved in the database correctly.
Â
what should i do?
Thanks,
Ali
Hi Ali,
Depending on how are you sending your HTML code through SendGrid, sometimes you need to ESCAPE certain characters before they can be sent out.
Â
For example:
Ampersand (&) must be converted to "&"
Semicolon (;) must be converted to ";"
Â
Here is the complete list of Entities: CLICK HERE
Look also for ENCODING HTML ENTITIES in JavaScript
Â
Good Luck
-Luigi
Â
Thank you.
I tried a lot but did not figure out how to escape characters in text boxes.
Â
Â
Â
Â
Hi Ali. Not sure if you ever got this figured out, but I just did and thought I would share with you and anyone else who stumbles on this post looking for the answer (like I did!).
Â
This is actually VERY simple, and I have confirmed that the code works with my SendGrid emails. SendGrid no longer cuts off the "&" and all text after it.
Â
I've "bolded" the lines that you need in the above code. If the code doesn't seem quite complete, it's because I've removed parts of it that weren't relevant to answering your question.
Â
Hope this helps!
Thanks.
Tammy Holliday
www.HollidayWoodworks.com
Â
Â
Â
Hi Tammy,
Â
I've been reading the thread above, i notice that:
const carvedText = escape($w("#textBox1").value); corresponds with \rText to Carve: ${carvedText}
Â
further down the code, did you find that you needed to enter this for each field where an escape character could be entered?
Â
I'm trying to resolve the issue on an application form. So i'm just wondering if i will need to complete the action for each text box? Or whether i can configure the code to apply to the whole form.
Â
Thanks Hannah
More on escape characters...
Â
http://net-informations.com/js/iq/escape.htm
Â
Â