Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Replacement for filter wpcf7_display_message

$
0
0

Replies: 0

Hi,

The filter, wpcf7_display_message, no longer supports html output. Is there a replacement that allows to add custom html?

This article here is not the most flexible solution:
https://contactform7.com/2016/01/27/html-is-not-allowed-in-messages/

You would have to hide the default cf7 response output with css or hook add_filter(‘wpcf7_form_response_output’, ‘__return_empty_string’); or maybe leave the message blank in message settings..

Then if you want custom messages for each status(sent, failed, spam, error) you would have to hide four strings with css or maybe use js to swap them out…as you can see all the work involved in figuring out how to properly display custom html messages increases.


Viewing all articles
Browse latest Browse all 59525

Trending Articles