PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Form Message Notifications with HTML

  1. Is there anyway for the email notification to send the HTML in raw HTML rather than rendering it? We previously used cforms and that allowed us to have the email notification come with raw HTML code with inserted form fields so the content could be immediately reposted onto a site. Anyway to do this with Gravity?

    Posted 13 years ago on Sunday September 5, 2010 | Permalink
  2. Gravity Forms sends the notifications as text/html so it's being sent as HTML. I believe in order for this to work it would have to be sent as plain text, which Gravity Forms does not currently do.

    Posted 13 years ago on Monday September 6, 2010 | Permalink
  3. Is there anyway we can adjust something within the plugin to send plain text?

    Posted 13 years ago on Monday September 6, 2010 | Permalink
  4. I actually figured out how to make the notification emails come out as plain text.

    1. In the form_display.php file, you simply adjust the line that encodes all the email with the "Content-type" of "text/html" to "text/plain". Line 272.
    2. Disable auto-formatting.

    Seems to work for me. I think this type of feature would be a good enhancement to future updates.

    Posted 13 years ago on Monday September 6, 2010 | Permalink
  5. Yes, you can always manually change the code although we don't recommend it. We are probably going to be adding a hook for this so it can be changed via custom code without modifying the core plugin files.

    Posted 13 years ago on Tuesday September 7, 2010 | Permalink
  6. I agree, but we need the ability to receive plain text emails so such is life. When do you plan on releasing this feature/hook?

    Posted 13 years ago on Tuesday September 7, 2010 | Permalink
  7. CraigTommola
    Member

    The shame of this issue is that there's no way to have it both ways. Ideally this would be configurable on a PER FORM basis ... because I have some forms I want to make plain text in order to push them into another system, and others I would like to have in HTML because they will be presented in an email client.

    Any way to edit line 272 to send BOTH plain text AND html at once?

    Much thanks
    CT

    Posted 13 years ago on Tuesday September 21, 2010 | Permalink
  8. We are going to look into how we can improve this, although it most likely will be done as a hook. If we implement it this way we will see about doing it on a per form basis so you say which form you want to apply it to when you use the filter.

    Posted 13 years ago on Wednesday September 22, 2010 | Permalink
  9. CraigTommola
    Member

    Sounds great - in the meantime, I am going to try some things to make it work ;)

    Posted 13 years ago on Wednesday September 22, 2010 | Permalink
  10. Definitely could use the option of having the "All Submitted Fields" message sent a plain text! It sounded in other threads like this is was upcoming feature, it is coming with 1.5?

    With large conditional forms the "All Submitted Fields" is the only reasonable way to send emails but if I hack form_display.php to text/plain then of course I just get all the html elements in a plain email. Not exactly what I was looking for.

    A cool idea would also be have the power to customize the CSS formatting for the pre-formatted "All Submitted Fields" table as that is such a great feature of Gravity Forms!

    Posted 13 years ago on Thursday October 28, 2010 | Permalink
  11. shogun
    Member

    Hi,

    Are you working on this?

    Can I change HOW the email is formatted? Maybe through? CSS?

    Posted 13 years ago on Thursday January 27, 2011 | Permalink
  12. Hi Shogun,

    If you check the "disable auto-formatting" ( http://grab.by/8CJh ) option you can customize the email format to your heart's delight, including CSS. :)

    Posted 13 years ago on Thursday January 27, 2011 | Permalink
  13. shogun
    Member

    Great. Can you tell me what file I have to modify? :)

    Posted 13 years ago on Friday January 28, 2011 | Permalink
  14. You don't need to modify a file, you can input your own custom HTML content directly on the notifications page.

    screenshot: http://grab.by/8DIz

    Posted 13 years ago on Friday January 28, 2011 | Permalink
  15. jbutzer
    Member

    Another vote for being able to switch between plain txt / HTML on a per form basis. That would be great.

    Posted 13 years ago on Thursday February 17, 2011 | Permalink
  16. Formatted properly, an email can contain BOTH plain text and HTML-formatted text. I think this should be the default method of sending regardless. This way, people can receive a pretty email the way you want them to see it, but when you send it to 1) someone who must read plaint text, or 2) a third-party system that needs to parse a plain text email (like I do).

    Posted 12 years ago on Sunday May 1, 2011 | Permalink
  17. laba05
    Member

    A checkbox for sending the notification as a plain text email is something that would really help us out. Today we have hacked various files to achieve this but it works less than stellar since we cant use "Insert all submitted fields" properly.

    Posted 12 years ago on Friday May 6, 2011 | Permalink
  18. I have some software that parses my emails and adds them to my CRM software. It doesn't do well with HTML formatted messages, so I'm putting in another vote for the ability to set a Plain Text attribute to the notification.

    I tried to update the form_display.php file, but it appears to have changed since that post. Anyone know where I can set the text/plain attribute?

    Not being able to parse the emails is absolutely killing my workflow!

    Thanks in advance!!

    Posted 12 years ago on Wednesday May 11, 2011 | Permalink
  19. It is located in common.php, search for text/html and you should find it in that file. You can change it to text/plain.

    Posted 12 years ago on Wednesday May 11, 2011 | Permalink