How To Remove Specific Fields From {all_fields} in Notifications

Would you like to exclude certain fields from your form email notifications when using the {all_fields} smart tag? This can be particularly useful when you have hidden fields or other information you don’t want to include in every notification.

In this tutorial, we’ll show you how to remove specific fields from your email notifications while still using the {all_fields} smart tag.

Adding the Code Snippet

The {all_fields} smart tag conveniently includes all form fields in your email notifications. However, to exclude specific fields from {all_fields}, we’ll need to use a custom code snippet.

Once you’ve set up and saved your form, it’s now time to add the snippet. If you need any help with adding snippets to your site, please check out this tutorial.

To Remove a Single Field From {all_fields}:

To Remove Multiple Fields From {all_fields}:

Note: You’ll need to replace the form ID (1000 in the examples above) and field IDs with your actual IDs. To find your form and field IDs, please check out this tutorial.

And that’s it! You’ve now set up your form to remove specific fields from email notifications. Would you like to learn more about customizing form notifications? Check out our tutorial on including field descriptions in email notifications.

Reference Filter

wpforms_entry_email_data