Can I use conditional logic to remove empty address fields from notification and auto-responder emails?

  • Profile Image
    greenbank
    Asked on September 15, 2013 at 07:21 PM

    Hi,

    I'm setting up a form for use by someone who will copy and paste the values to a spreadsheet and used your excellent "remove headers" tip for the address fields of the notification and auto-responder emails.

    However, this will now render blank lines in an address, which doesn't look good. For example, the email content for field "address" has the following tags for output: 

    {address:addr_line1}
    {address:addr_line2}
    {address:city}
    {address:state}
    {address:postal}
    {address:country}

    This gives output, when all fields are complete, similar to:

    134 West Acre Drive
    Tommbley
    Dallas
    Texas
    3123254
    United States

    However, if any field is left blank, we get: 

    134 West Acre Drive

    Dallas
    Texas

    United States

    So, I'd like to only output fields with values to give output like the following:

    134 West Acre Drive
    Dallas
    Texas
    United States

    Can this be done?

    Thank you in advance for your help and awesome form service.

    Best regards,

    Craig

    -------------------------------------------------------------------------------------

    Hi Jonathan,

    Thank you for the fast reply.

    I've tried that option but still the problem persists. The notification email I'm using is, I thought, the "default email notifier" but with relevant recipient addresses altered.

    Any ideas?

    Regards,

    Craig

  • Profile Image
    jonathan
    Answered on September 15, 2013 at 08:04 PM

    Hi,

    You can already hide empty fields on the email from within the form builder.

    Follow this steps to do this.

    1. Click on Setup & Embed

    2. Preferences

    3. Advance Settings

    4. On the option Hide Empty Fields on Emails , set the value to Enabled.

     

    Please inform us if this does not work for you.

    Thanks.