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.

HTML Block Output in Email Notifications and on Pages

  1. ibvmarketing
    Member

    Hi,

    I am using gravity forms to recommend a solution to people based on the answers to specific questions.

    My form is at http://www.ibvmarketing.com/my-tool-advisor/

    The recommendation contains html output including a link.

    When you use my multi-page form, the conditional logic outputs the proper html on the second to last page of the form.

    I need to be able to send the html information in a notification email and save it in the gravity forms entries, so someone can access it again (using the Gravity Forms Directory Plugin).

    I read http://www.gravityhelp.com/forums/topic/conditional-html-fields-to-display-on-confirmation

    because this is similar to my issue. I tried using the code mentioned at the end of that post (http://pastie.org/1291129). It displayed the new email content correctly, but I am not sure exactly how to modify that code for my purposes.

    In the code there is a line

    (" . $_POST["input_6"] . ")

    I tried changing 6 to the field id number for the html block, but it didn't display.

    How do you figure out the input number?

    Or better yet, is there a notification tag like {all fields} where it can display the html blocks that meet the conditional logic used throughout the form?

    Posted 12 years ago on Wednesday December 14, 2011 | Permalink
  2. HTML blocks are not part of the form submission, so they won't come up in the all_fields merge tag.

    You can find out the IDs of the fields by hovering over the field in the form builder: the ID will be displayed next to the name. Or, you can preview the form and the "View Source" in the browser to get the actual IDs you need.

    If you need more help please let us know.

    Posted 12 years ago on Thursday December 15, 2011 | Permalink
  3. ibvmarketing
    Member

    Hi Chris,

    Thanks for the answer.

    I was able to find the ids, so for example I changed the line of code to

    (" . $_POST["input_89"] . ")

    Is that correct syntax, based on the code shown above from pastie?

    which is an html block for me and it did not come up.

    Also another concern of mine is if I add all the html blocks manually to the email it will defeat the purpose of the recommendation.

    The idea is for only the html block that meets the conditional logic would be shown.

    Posted 12 years ago on Thursday December 15, 2011 | Permalink
  4. ibvmarketing
    Member

    Hi,

    Is there any more information on this. I have been trying to get this project going for three weeks. I am going to have to switch to another software unless I can figure out how to get HTML output in email from gravity forms.

    I understand it was not built in, but seems to be a crucial feature.

    Posted 12 years ago on Sunday January 8, 2012 | Permalink
  5. I also need this problem solved. Anyone? This shouldn't be that big of a deal, but apparently no one knows.

    Posted 12 years ago on Tuesday January 24, 2012 | Permalink
  6. As Chris said, the HTML blocks are not part of the form submission and were never intended to be. They're for outputting freeform HTML and aren't form inputs. I completely disagree that this is a "crucial" feature.

    You can always use styled paragraph text (textareas) with default text in place of textual content in HTML blocks. Those would be submitted along with the other form data because they're actual form elements.

    Posted 12 years ago on Wednesday January 25, 2012 | Permalink
  7. When you say this...

    "You can always use styled paragraph text (textareas) with default text in place of textual content in HTML blocks. Those would be submitted along with the other form data because they're actual form elements."

    Not sure exactly what you are proposing there. Please elaborate.

    Posted 12 years ago on Friday February 10, 2012 | Permalink
  8. Kevin is referring to the paragraph text form field to use here, instead of the HTML field.

    Posted 12 years ago on Friday February 10, 2012 | Permalink
  9. davidcom
    Member

    Resurecting this. I need this functionality. This is for a language school. I need a teacher to be able to select a students level. For each level, there is a set of capabilities that define what the level means (what the student is capable of doing in English at their level). Then in the notification to the student, I need the student to receive something like:

    Your level: A1
    You are capable of the following:
    - Writing a simple post card
    - Telling about where your are from
    - Asking simple questions

    I have created a drop down list in the form where the teacher selects the student's level (A1, A2, etc.), and then I use the list's merge tag to plug in the level in the notification. But how can I have the notification plug in the corresponding capabilities that are associated with the level given? (formatted in a list form, with bold, underline, etc)

    In a way, I guess the list of capabilities is the value of the level given. Can one enter html coded lists in the value boxes of drop down field entries?

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  10. David Peralty

    You could use Conditional Shortcodes in your notification message to show the various details based on their selection - http://www.gravityhelp.com/documentation/page/Shortcodes

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  11. davidcom
    Member

    I'll give that a try. Thanks David.

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink