• Hi,

    It appears that, on the latest versions of WordPress and Contact Form 7, the contextual error messages do not display on validation errors. I’ve seen several support topics on the matter dating as far as 10 months ago with no reply. Is the project still alive?

    Thank you!

Viewing 1 replies (of 1 total)
  • Thread Starter Little Boy Running

    (@mvauchel)

    After investigation the problem lies in a change in the way CF7 targets fields targeting starting with version 5.6.

    Before: the field name is added as a class
    After: the field name is added a data attribute

    Plugins that add form tags to CF7 must change the way they build the HTML markup in order for the validation to work. With International Telephone Input for CF7 this means modifying line 90 in includes/form-tag.php

    Before:
    '<span class="wpcf7-form-control-wrap %1$s"><input %2$s /><input %3$s /><input %5$s /><input %6$s /><input %7$s />%4$s</span>',

    After:
    '<span class="wpcf7-form-control-wrap" data-name="%1$s"><input %2$s /><input %3$s /><input %5$s /><input %6$s /><input %7$s />%4$s</span>',

    Obviously changing the code in the plugin yourself is not a very good idea. Ideally the author should validate this kind of changes, make sure it doesn’t break anything else then publish a new release.

Viewing 1 replies (of 1 total)
  • The topic ‘Contextual validation error message missing’ is closed to new replies.