Title: Empty comment fields
Last modified: August 19, 2016

---

# Empty comment fields

 *  [changethethought](https://wordpress.org/support/users/changethethought/)
 * (@changethethought)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/empty-comment-fields/)
 * I know there has been a lot of topics covering the issue of custom error pages
   when dealing with wp_die() but I just keep thinking there has got to be an easier
   fix for dealing with empty comment fields.
 * Is there any way, if your theme has a comments.php file to add an if else if,
   so that if the user had not typed anything in the comments field, name field,
   email field, etc. that you could just display, within the missing fields something
   like, “Please enter a comment”?
 * That way wp_die() won’t even be called, the user will just see the “Please enter
   a comment” in the field they haven’t filled out yet.
 * Is this a tough thing I am asking here? I have very little background in PHP 
   but used to write a lot of actionscript and this is how we dealt with empty fields
   in Flash. It just seems counter intuitive to immediately direct someone to an
   entirely different error page for type missing in a comment field.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [changethethought](https://wordpress.org/support/users/changethethought/)
 * (@changethethought)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/empty-comment-fields/#post-669638)
 * Anyone have any ideas?
 *  Thread Starter [changethethought](https://wordpress.org/support/users/changethethought/)
 * (@changethethought)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/empty-comment-fields/#post-669737)
 * Ha ha! I found a few javascript plugins that took care of this and added axax
   checking to my comment forms. No more crappy error page. Thank you lord.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Empty comment fields’ is closed to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [wp_die](https://wordpress.org/support/topic-tag/wp_die/)

 * 2 replies
 * 1 participant
 * Last reply from: [changethethought](https://wordpress.org/support/users/changethethought/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/empty-comment-fields/#post-669737)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
