Guest comments not accepting Name/Email fields

I'm completely stumped on this one...
I cannot get the comment form to accept the name and email fields on the theme I created.

It works fine for logged-in users, but when a visitor tries submitting a comment, it says the name and email fields must be specified. I dumped the $stored array and the `$stored['comment']` parameter is the only one storing the value, but the `$stored['name']` and `$stored['email']` values are always empty.

Any ideas why? I'm using a comment_form.php template if that makes any difference.

You can try it at http://m5url.me/photos on one of the photos.

Comments

  • acrylian Administrator, Developer
    Did you try if it works on the standard themes? If so, there might be something wrong in your theme.
  • Yes, I did try the standard themes and it does work, so therefore it IS a problem with my theme.
    However, I copied the form fields from those themes and since the form is submitted to `#`, I'm not sure at this point how the comment submission is being handled.
  • acrylian Administrator, Developer
    Ok, I always need to ask that as many people don't try that. I am not sure what you mean with "copied the form fields from those themes". All you should need to copy is the printCommentForm() function which the comment_form plugin provides.
  • Ok, I found the problem. My function for printing the disabled form field's hidden input fields wasn't testing correctly, so the hidden fields were being printed with the same name attribute as the non-disabled fields.

    The reason I created my own comment form is because the one printed by ZenPhoto is formatted as a table and that's not tabular data.
    Since part of my goal was to use the best HTML/CSS formatting practices, I removed all of the table-formatted syntax that didn't contain tabular data such as the comments and comment forms.
  • acrylian Administrator, Developer
    I can understand that concern regarding semantics. We probably really should change that sometime to use labels (there are places on the backend as well).

    But there always more important things come in the way since this works although not correct semantically. And of course it will break some older themes as well.
Sign In or Register to comment.