WordPress.org

Support

Support » Plugins and Hacks » Contact Form 7 » [Resolved] Remove empty values from Contact Form email

[Resolved] Remove empty values from Contact Form email

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    @takayukister

    Check “Exclude lines with blank mail-tags from output” box in the Mail section.

    Thanks for your reply!
    Unfortunately it wont work just to check the “Exclude lines with blank mail-tags from output” box in the Mail section.

    The problem is that the form will have a large amount of fields and to make it easier to read the email I want to only add the fields where the user has entered a value.

    If the user choose to enter 10 for Pizza and 10 For Cola I just want the email to
    show Pizza: 10 and Cola: 10.
    So I need to exclude the labels as well if the value is empty if its possible.

    My email template looks like this:

    {Food}

    Hamburgers:
    [Hamburgers]

    Pizza:
    [Pizza]

    Taco:
    [Taco]

    {Drinks}

    Cola:
    [Cola]

    Fanta:
    [Fanta]

    Sprite:
    [Sprite]

    Plugin Author Takayuki Miyoshi

    @takayukister

    Put both the label and the value in one line.

    Perfect, it works!
    Thanks a lot for your help! =)
    And thanks a lot for your work with the contact form plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Remove empty values from Contact Form email’ is closed to new replies.
Skip to toolbar