WordPress.org

Ready to get started?Download WordPress

Forums

Checkbox at Comment Box and Make it Required (3 posts)

  1. Abhik
    Member
    Posted 1 year ago #

    Hi,
    I am working on a hack that allows me to include a checkbox at comment_form hook.

    I can do that, but I want to make it required. Like, the commentator will see an error page if the checkbox isn't ticked.

    How do I do that?

  2. bcworkz
    Member
    Posted 1 year ago #

    I did something similar by adding the checkbox to the comment form through the filter 'comment_form_default_fields'. I'm not sure if you use 'comment_form' that the checkbox is part of the comment form or not. It would need to be, because I then use the filter 'pre_comment_on_post' to check the status of my checkbox.

  3. Abhik
    Member
    Posted 1 year ago #

    Thanks..
    Working like a charm :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.