【问题标题】:Contact Form 7 WP Plugin - Validation联系表格 7 WP 插件 - 验证
【发布时间】:2023-03-13 11:23:02
【问题描述】:

我已在网上搜寻此问题的答案,但找不到解决方案。

有什么方法可以完全删除验证消息(例如,“请填写必填字段”、“发生验证错误”)并在有问题的文本框周围留下红色边框?

换句话说,我希望 Contact Form 7 仍能正常工作,只是不显示验证消息文本;红色边框就可以了。

我已经编辑了 CF7 函数文件(includes/functions.php)并注释掉了函数 wpcf7_messages() 函数的部分,例如

//'invalid_required' => array(
        //'description' => __( "There is a field that the sender must fill     in", 'wpcf7' ),
        //'default' => __( 'Please fill the required field.', 'wpcf7' )
    //)

但没有任何效果:(

任何帮助将不胜感激。

【问题讨论】:

    标签: wordpress validation contact-form-7


    【解决方案1】:
    //into.append('<span class="wpcf7-not-valid-tip">' + message + '</span>');
    

    注释掉位于此处的 scripts.js 文件中的第 210 行 - plugins/contact-form-7/includes/js/scripts.js.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-08
      • 1970-01-01
      • 1970-01-01
      • 2017-04-24
      • 2016-01-08
      • 2017-01-12
      相关资源
      最近更新 更多