• Resolved skarck

    (@skarck)


    Hi!

    I’m developing some kind of a photo gallery and need to display a comment form that will write comments to the DB. But I wanna decide things like the comment_post_ID by form fields. so i copied the redered html of the normal coment form and tried some stuff but it doesn’t work…

    this is my code:

    <form method="post" action="<?php bloginfo('url'); ?>/wp-comments-post.php">
          <input type="hidden" name="SOME-VALUE" value="<?php echo $MY-COMMENT-POST-ID; ?>" />
          <input type="text" name="author" id="author" value="User-1" />
          <input type="text" id="comment" name="comment" />
          <input type="submit"/>
          </form>

    btw. i’m not using the loop…

    i appreciate any help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Do you wanna only one comment form for the gallery? (not a form for each photo?) If so you may considere create a page for the gallery and install the comment form (comments.php) on the page template (page-idpage.php)

    I don’t know if I understand your question =/

    Thread Starter skarck

    (@skarck)

    thanks, i already fixed it by myself:
    what i wanted to do is a comment form per photo.
    i set an hidden input of name="comment_post_id" to the attachment-id.
    what i missed was an id="commentform" in the <form> WP needs for validation…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create Custom Comment Form’ is closed to new replies.