• Hi
    I’m wondering if it’s possible to have more than one comment form and using them for different pages?
    I’m trying to have a comment form for some of my pages and use wysiwyg html editor for the comment form with an html default value for it.
    The reason of doing this is to give user a table to fill in and post as a comment to the post, like a question that is a table, they need to fill in and post and be shown as comment.
    I’d be very grateful if you know any solution or can give me some advice to do that.
    By the way I’m using the redline theme.Also I’m using a plugin called “easy comment upload” to add an upload form to it.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • if it’s possible to have more than one comment form

    generally:

    by using either page templates or conditional tags in page.php,
    you can call different comments template files:
    http://codex.wordpress.org/Function_Reference/comments_template
    http://codex.wordpress.org/Function_Reference/is_page

    in which you could call different comment forms;
    http://codex.wordpress.org/Function_Reference/comment_form

    no idea about the details, and if this would work with the mentioned plugin.

    Thread Starter sepehr741

    (@sepehr741)

    Thank you so much, I’ll try with them and see. 🙂

    Thread Starter sepehr741

    (@sepehr741)

    Hi
    Now I have an upload form for my comments, and when I have more than one comment form in a page, when I try to upload a picture, it puts the link in the first comment form, even when I’m using the second form. I guessed that it sends the link to a form with a specific id and as this id is same for all forms it sends it to the first form (it’s just a guess). I’m trying to pass the post id into the comment form id as below, but this doesn’t work, could you please have a look? thanks

    <?php
    global $postid;
    $postid=the_ID();
    $custom_args = array(
    ‘comment_field’ => ‘<p class=”comment-form-comment”><textarea id=”comment $postid” name=”comment” cols=”90″ rows=”5″ aria-required=”true” >

    </textarea></p>’,
    ‘comment_notes_before’ => ”,
    ‘comment_notes_after’ => ”,
    ‘title_reply’ => __( ‘Leave a Reply’, ‘redline’ ),
    ‘title_reply_to’ => __( ‘Leave a Reply to %s’, ‘redline’ ),
    ‘cancel_reply_link’ => __( ‘Cancel reply’, ‘redline’ ),
    ‘label_submit’ => __( ‘Post Comment’, ‘redline’ )
    );

    global $post;
    comment_form( $custom_args, $postid);
    /*comment_form( $custom_args );*/ ?>

    as you can see in custom arguments array I use $postid variable and pass it to the array, but I dont know how I should use a variable in the array elements.

    Thanks for any help in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom comment forms for different pages.’ is closed to new replies.