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.

Email notification customization

  1. I have built a gravity form in wordpress. I have around 20 text fields. but when I submit the form then i see all 20 fields in the email which is fine. But I want to show only those fields in email which has values if there is no value in any field then it should not show up. Any idea how to achieve that functionality

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  2. How are you crafting your notification? Are you manually placing merge tags in your notification instead of using the {all_fields} merge tag?

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  3. In wordpress admin if i go to the form section and then I click "Notifications" then in message area I put the html code something like that for all fields . like its a huge code I just put a small html snippet. If you can give me your email address then I can send you the screen shot or the link of my URL.

    "Name: {First Name:2} {Last Name:3}

    Phone: {Phone:4}

    Email: {Email:5}

    Moving From: {Moving From:7}

    Moving To: {Moving To:8}

    Moving Date: {Moving Date:9}
    <table>
    <tbody>
    <tr>
    <td style="vertical-align: top;">
    <table style="font-size: 10px;">
    <thead>
    <tr>
    <th>Item</th>
    <th>Quantity</th>
    <th>Weight (lbs)</th>
    <th>Volume (cu. ft.)</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>Appliances</td>
    </tr>
    <tr>
    <td>AirConditioner Large</td>
    <td>{AirConditioner Large:20}</td>
    <td>{Volume:42}</td>
    <td>{Weight:41}</td>
    </tr>
    <tr>
    <td>AirConditioner Small</td>
    <td>{AirConditioner Small:25}</td>
    <td>{Volume:43}</td>
    <td>{Weight:45}</td>
    </tr>
    <tr>
    <td>Dehumidifier</td>
    <td>{Dehumidifier:29}</td>
    <td>{Volume:44}</td>
    <td>{Weight:46}</td>
    </tr>
    <tr>
    <td>Diswasher</td>
    <td>{Diswasher:488}</td>
    <td>{Volume:489}</td>
    <td>{Weight:490}</td>
    </tr>
    <tr>
    <td>Dryer</td>
    <td>{Dryer:478}</td>
    <td>{Volume:48}</td>
    <td>{Weight:49}</td>
    </tr>
    <tr>
    <td>Freezer 10 or less</td>
    <td>{Freezer 10 or less:50}</td>
    <td>{Volume:51}</td>
    <td>{Weight:52}</td>
    </tr>"

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  4. If you are not using the all_fields merge tag, then you are going to have to rely on conditional shortcodes:

    http://www.gravityhelp.com/documentation/page/Shortcodes

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  5. Thanks for your quick response.
    If write this [gravityform id="5" name="SampleForm" ajax="true" ] then the form is displaying. But if put something like that then the form is not showing up.
    [gravityform id="5" name="SampleForm" ajax="true" action="conditional" merge_tag="{AirConditioner Large:20}" condition="isnot" value=""].
    IS there anything I am doing wrong should I put this code into any php file like functions.php. I am just writing it into the wordpress "Page/Post" Editor.
    In the above code I am trying not to display "Airconditioner Large" in email if it is null

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  6. You use conditional shortcodes in your notification or form confirmation, not on the form embed.

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  7. hmm Sorry I couldn't understand. Can you please give me the sample code of it. well like you said I should implement the conditional shortcodes in my notification message area. for example. I have the below html code and I want to not to show entire <tr> if user didnt insert any value in "{AirConditioner Small:25}". So where should I put the conditional shortcode in here. Can you please put the conditional shortcode in below code so I will get the better sense of it. Thanks in advance

    <tr>
    <td>AirConditioner Small</td>
    <td>{AirConditioner Small:25}</td>
    <td>{Volume:43}</td>
    <td>{Weight:45}</td>
    </tr>
    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  8. HI,
    I will really appreciate your help on it

    Posted 11 years ago on Saturday February 23, 2013 | Permalink
  9. Try this (isnot empty is what we are trying to test for with this conditional) in your user notification.

    [php]
    [gravityforms action="conditional" merge_tag="{AirConditioner Small:25}" condition="isnot" value=""]
    <tr>
     <td>AirConditioner Small</td>
      <td>{AirConditioner Small:25}</td>
      <td>{Volume:43}</td>
      <td>{Weight:45}</td>
    </tr>
    [/gravityforms]

    Documentation on conditional shortcodes: http://www.gravityhelp.com/documentation/page/Shortcodes

    Be sure to disable autoformatting for the notification since you are adding your own HTML.

    Posted 11 years ago on Saturday February 23, 2013 | Permalink
  10. Thanks. It solved my issue :)

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  11. You're welcome.

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink

This topic has been resolved and has been closed to new replies.