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.
- The topic ‘Empty comment fields’ is closed to new replies.