Email Notification Formatting Issue

I’ve been experiencing an odd formatting issue with email notifications ever since I added a new “address” field to my form. When an email notification comes through, the spacing for some text input fields come through a bit wonky.

Example:

Whereas before I added the address field, email notifications came through formatted as expected.

The actual submissions within the Netlify dashboard do not have these spacing issues. I’ve searched the web for answers, but haven’t had any luck finding anything promising. Any help or suggestions would be appreciated!

Site URL is: https://cypressroofingla.com/

1 Like

Hello @jcarpenter, welcome to the Community!

It looks like your labels have content like \n Email Address\n where there are new lines. While in the UI, we strip out whitespace (including newlines), our notification parser does not. Could you make sure that your elements contain only the string you want in your notification (no whitespaces) and use
elements around your labels and see if that helps?

Hey @Dennis thanks for your reply. I’ve double checked the string that I am submitting, and it does not contain any \n characters within it. This is the exact string that I am submitting via fetch(). Is there anything abnormal in the below string that I need to strip out?

form-name=evaluation-form&propertyType=Residential&roofType=Metal&serviceNeeded=New%20Construction&firstName=John&lastName=Doe&address=123%20Cool%20Street&city=Baton%20Rouge&zipCode=70808&emailAddress=test%40gmail.com&phoneNumber=123456789&howDidYouHearAboutUs%3F=Facebook&tellUsAboutYourProject=This%20is%20a%20test%20form%20submission

Dennis is talking about your form DEFINITION, not submissions. Check out your code for those stray newlines, is what he was suggesting :slight_smile:

@fool thanks for clarifying. That was indeed the issue. For whatever reason, during build time Gridsome was adding &nbsp; and <br> tags where I had some rather simple indentation. It works, but my form fields are now one long line hah. I’ll learn to live with it I suppose. Thanks for the help!

1 Like