Please Note: We are no longer using forums to facilitate standard support. 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.

Conditional Merge Tag HTML in Notification Email

  1. ssimon

    While working on an entry form recently, I came up with a feature request that would extend upon the current functionality found by selecting "All Merge Fields."

    Our form is registration for app development. For each application, a number of questions are asked and, after submitting the entry form, users receive an HTML email detailing what they've registered.

    Now, because there are a number of question involved with each application, we have to insert all possible merge tags (for example, {App #2: Market Focus:45} {App #2: Device(s):44} {App #3: Market Focus:47} {App #3: Device(s):46}) to accomodate.

    Unfortunately, formatting the HTML email proves difficult as line breaks and paragraphs need to be hard-coded regardless of whether or not the application will show up. Our form allows for up to twenty-four possible application registrations, so we could potentially send the user an email with details about one registered application with twenty-three empty line breaks.

    Get to the point:
    What would be helpful is if we could expand the merge tag to define before and after content, similar to wp_list_pages. Perhaps something like:
    {[Field Name]:[field_id]:before:after}

    In our form it would look something like
    {App #2: Market Focus:45:<p>:</p>}

    Many thanks for your time and the fantastic plugin.

    Posted 3 years ago on Tuesday February 7, 2012 | Permalink
  2. Hi ssimon,

    Thanks for sharing your idea. :)

    Posted 3 years ago on Monday February 13, 2012 | Permalink
  3. I have a similar need and idea, i think but just confirming... From what I see above it is not currently possible to have something like this.

    Notification setup:
    Phone: {field...}
    Cell Phone: {field...}

    email notifications:

    User Registration with cell phone:
    Phone: (555)-555-5555
    Cell Phone: (556)-777-7777

    User Registration without cell phone:
    Phone: (555)-555-5555
    Cell Phone:

    Is it possible to append the 'Cell Phone:' text to the field thereby having the additional text not display if the field is empty?

    Thanks. This plugin is making our registration silky smooth!

    Posted 3 years ago on Thursday March 1, 2012 | Permalink


Support Tickets

Open A New Support Ticket
 Open A New Priority Support Ticket *

* Developer license holders only