• Resolved nikhlede

    (@nikhlede)


    Hi, so I was just wondering how to customize the email notification I receive after a user fills out a form.

    I know where to look (basically) Edit —> Email notifications —> Body

    but what I find is this

    {all_fields}

    For example I’ve no need to see that the user has checked the consent box, or for the final input-field on the form if it’s not filled out (since it’s not a required field, but I am using a default value because a placeholder text is only otherwise shown when the field is clicked upon, this way I get to show it regardless).

    The thing is that I don’t know how to go about customizing the email notification, as I’ve never done it before (in terms of correctly targetting certain fields, etc. before customizing them).

    Any help would be greatly appreciated, cheers!

    • This topic was modified 4 years, 1 month ago by nikhlede.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Laura – WPMU DEV Support

    (@wpmudev-support8)

    Hi @nikhlede

    I hope you’re well today and thank you for your question!

    There are two ways to customize the “content” of the data that was submitted:

    1. you can use

    {all_non_empty_fields}

    in notification body instead of {all_fields} and this way fields that are not submitted (left empty, not checked, hidden due to visibility conditions) will not be included in notification content

    2. or you can use individual fields instead and only include specific ones that you need in notification.

    That second method would let you choose which fields to include and you’ll find all available fields (and some additional options like e.g. user IP or current date etc) under the blue(ish) share icon of message body editor.

    However, in this case all the added fields will be included even if they don’t have value (e.g. it is an optional field and wasn’t filled-in).

    It’s not possible to “mix” these ways and to “conditionally include” fields in notification other than these two ways currently. But I think one of them should work better for you than just using {all_fields}.

    Best regards,
    Adam

    Thread Starter nikhlede

    (@nikhlede)

    Thanks a lot, at the end of the day it’s less confusing having the checkbox being shown than placeholder text in an input-area field being shown even if it’s untouched, so I went with the “{all_non_empty_fields}” option.

    Thanks again and have a good one 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘E-mail notification customization’ is closed to new replies.