Title: Comment Form Inline Errors
Author: latorante
Published: <strong>2013 年 9 月 11 日</strong>
Last modified: 2013 年 11 月 14 日

---

搜索插件

![](https://ps.w.org/comment-form-inline-errors/assets/banner-772x250.png?rev=804568)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/comment-form-inline-errors_3dabe4.svg)

# Comment Form Inline Errors

 作者：[latorante](https://profiles.wordpress.org/latorante/)

[下载](https://downloads.wordpress.org/plugin/comment-form-inline-errors.1.0.2.zip)

 * [详情](https://cn.wordpress.org/plugins/comment-form-inline-errors/#description)
 * [评价](https://cn.wordpress.org/plugins/comment-form-inline-errors/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/comment-form-inline-errors/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/comment-form-inline-errors/#developers)

 [支持](https://wordpress.org/support/plugin/comment-form-inline-errors/)

## 描述

This plugin takes care of WordPress inner comments error handling, and shows comment
errors above the form, instead of using the weird grey page with single line error
description. All this **out-of-the-box**.

It also **remembers** what you’ve typed in. So for example, if you fill in the comment
form, and send it and forget required field, it will show the error above the form,
and prefills the form with values you’ve submitted so you don’t have to retype them
again (which is annoying).

By default, the plugin prints the error in this markup:

    ```
    <div id="formError" class="formError" style="color:red;">
        <p>--error-here--</p>
    </div><div class="clear clearfix"></div>
    ```

So it should be quite easy for you to style it in your css file with `".formError"`
or `"#formError"`, you know the drill :). The default red colour is there just in
case you won’t be able to style and since it’s error, red seems appropriate.

**By the way,** if you’ve customised your comment form with new fields, and you’re
using the `preprocess_comment` hook, with the correct WordPress way of handeling
errors, which is using `wp_die` on error encounter, this plugin will play nicely
with that, and display your error messsage above the form as well.

## 屏幕截图

 * [[
 * This shows form error before plugin activation, and after.
 * [[
 * With plugin activated, before submitting our comment.
 * [[
 * With plugin activated, after comment submission.

## 安装

 1. Go to your admin area and select Plugins -> Add new from the menu.
 2. Search for “Comment Form Inline Errors”.
 3. Click install.
 4. Click activate.

## 常见问题

  It doesn’t do anything, what should I do?

If that is the case, deactivate the plugin, delete it, and move on :).

  I have a costum post type with comments support, will this work with it?

**Yes,** it will.

  I have my own custom comment form fields, will it remember the values of those
after error as well?

Do you know what? It actually might, if they are hooked in `comment_form_default_fields`,
but it only checks for inputs[text] and textareas tho :).

## 评价

此插件暂无评价。

## 贡献者及开发者

「Comment Form Inline Errors」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ latorante ](https://profiles.wordpress.org/latorante/)

[帮助将「Comment Form Inline Errors」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/comment-form-inline-errors)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/comment-form-inline-errors/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/comment-form-inline-errors/)，或
通过[RSS](https://plugins.trac.wordpress.org/log/comment-form-inline-errors/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/comment-form-inline-errors/)。

## 更新日志

#### 1.0.2

 * Tested on new WP version.

#### 1.0.1.1

 * Fixed spelling.

#### 1.0.1

 * Fixed backslash issue.

#### 1.0

 * Plugin released.

## 额外信息

 *  版本 **1.0.2**
 *  最后更新：**13 年前**
 *  活跃安装数量 **20+**
 *  WordPress 版本 ** 3.0 或更高版本 **
 *  已测试的最高版本为 **3.7.41**
 *  语言
 * [English (US)](https://wordpress.org/plugins/comment-form-inline-errors/)
 * 标签
 * [comment](https://cn.wordpress.org/plugins/tags/comment/)[comments](https://cn.wordpress.org/plugins/tags/comments/)
   [errors](https://cn.wordpress.org/plugins/tags/errors/)
 *  [高级视图](https://cn.wordpress.org/plugins/comment-form-inline-errors/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/comment-form-inline-errors/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/comment-form-inline-errors/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/comment-form-inline-errors/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/comment-form-inline-errors/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/comment-form-inline-errors/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/comment-form-inline-errors/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/comment-form-inline-errors/reviews/)

## 贡献者

 *   [ latorante ](https://profiles.wordpress.org/latorante/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/comment-form-inline-errors/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://donate.latorante.name/)