How to Hide Image Choices in Notification Emails

Would you like to hide Image Choices in your notification emails from WPForms? If you want to show image choices on your forms but don’t necessarily need them in your email, you can easily use a small PHP code snippet to disable these. We’ll show you how to disable the Image Choices from your notification emails.

When using image choices in WPForms, the image for any user-selected option(s) will be included in the notification email by default. If you need any help on how to set up your form with image choices, please check out this documentation.

If you don’t need to see these images in your notifications, performing this step could potentially save you precious time and valuable space when sending and receiving your form notifications.

Hiding the image choices in notifications

The four snippets shown below each apply to a different field type: Multiple Choice, Checkboxes, Payment Checkbox Items, and Payment Multiple Items fields.

As an example, this is how a form would look with images set up for the Checkboxes.

An example form using image choices for the checkboxes

To hide the Image Choices for all of these form fields, you’ll need to copy all three snippets into your site. If you’re not sure how or where to add snippets to your site, please review this tutorial.

Multiple Choice Field

/**
 * Multiple Choice - hide images on notification emails
 *
 * @link https://wpforms.com/developers/how-to-hide-image-choices-in-notification-emails/
 * @return bool
 */

add_filter( 'wpforms_radio_field_html_value_images', '__return_false' );

Checkbox Field

/*
 * Checkboxes - hide images on notification emails
 *
 * @link https://wpforms.com/developers/how-to-hide-image-choices-in-notification-emails/
 * @return bool
 */

add_filter( 'wpforms_checkbox_field_html_value_images', '__return_false' );

Payment Multiple Items Field

/*
 * Multiple Items - hide images on notification emails
 *
 * @link https://wpforms.com/developers/how-to-hide-image-choices-in-notification-emails/
 * @return bool
 */

add_filter( 'wpforms_payment-multiple_field_html_value_images', '__return_false' );

Payment Checkbox Items Field

/*
 * Checkbox Items - hide images on notification emails
 *
 * @link https://wpforms.com/developers/how-to-hide-image-choices-in-notification-emails/
 * @return bool
 */

add_filter( 'wpforms_payment-checkbox_field_html_value_images', '__return_false' );

By removing the image choices from the notification emails you can reduce the size of the email as it’s being sent.

with this snippet you can easily hide image choices from your email notifications

And that’s all you need to disable these images in your notifications. Would you like to change or remove the text shown at the bottom of these email notifications? If so, take a look at our How to Remove or Change Email Notification Footer Text.

Reference Filters