Сообщение формы – .wpcf7-response-output
So, following the Contact Form 7 documentation on DOM Events, I was able to get this working how I wanted with the following JS code:
/* Validation Events for changing response CSS classes */
document.addEventListener( 'wpcf7invalid', function( event ) {
$('.wpcf7-response-output').addClass('alert alert-danger');
}, false );
document.addEventListener( 'wpcf7spam', function( event ) {
$('.wpcf7-response-output').addClass('alert alert-warning');
}, false );
document.addEventListener( 'wpcf7mailfailed', function( event ) {
$('.wpcf7-response-output').addClass('alert alert-warning');
}, false );
document.addEventListener( 'wpcf7mailsent', function( event ) {
$('.wpcf7-response-output').addClass('alert alert-success');
}, false );
How to modify Contact Form 7 Success/Error Response Output – https://wordpress.stackexchange.com/questions/282751/how-to-modify-contact-form-7-success-error-response-output
Сообщение об ошибке – .wpcf7-not-valid-tip
После каждого поля с валидацией может генерироваться сообщение об ошибке (класс .wpcf7-not-valid-tip) после переноса фокуса и начала исправление в поле это сообщение должно бы пропадать, но не пропадает
Читать далее CF7 сообщения