WordPress.org

Ready to get started?Download WordPress

Forums

Multiple comment forms on one page (3 posts)

  1. alancrissey
    Member
    Posted 2 years ago #

    I have a one page site with multiple comment forms on it. Look at it here:

    http://atcactionsspeaklouder.com.s92915.gridserver.com

    Since the comment form uses IDs, and doesn't generate a unique ID for the elements of each form, it's causing some problems. Submitting the form is fine, but clicking on the label of any form but the first one will jump you over to the first form. Also, this causes Ajax to only function on the very first form. I tried adding classes to all of the elements and only referencing them in the Ajax .js file, but that completely broke it.

    Anyone have any ideas on this? I see this has been asked some on here, with few answers. Thanks.

  2. alancrissey
    Member
    Posted 2 years ago #

    Nevermind, solved it. I just added class names to the form elements in the comment form function, and then changed the .js file in my ajax plugin to reference the classes instead of the IDs.

    So that solved the Ajax problem, now I just have the less serious issue of the notifications showing up on all of the forms instead of just the one that's being submitted.

  3. k5stokes
    Member
    Posted 1 year ago #

    alancrissey, I'm having the exact problem you reference here. Here's my page with multiple comment forms (inside the Fancbox pop-ups for each image):
    http://12apostrophes.net/kunal

    But when I add a class name to my comment forms by creating a <div class="comment-form"> around my <?php comment_form(); ?> and then change my ajax .js to reference that rather than #commentform id it doesn't work.

    Can you let me know what plugin you were using? Any tips?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic