ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Set comment status to "Closed" using a hidden form field

September 20, 2012 11:35am

Subscribe [1]
  • #1 / Sep 20, 2012 11:35am

    Stephen T

    127 posts

    I know this isn’t a normal use of comments, but I’m trying to figure out the best way to set up a ticketing system where we need the ability to have public comments that are visible to the person who submitted the request and private comments that are only visible to the site admins.  I figured one easy way to accomplish this would be to set up the page with two comment forms - one that automatically sets the comment status to be “Closed” and another public form that sets the comment status to be “Open”.  That way I can use the status=“Closed” parameter to show private comments only to the site admins.

    But I can’t figure out a way to pass the “Closed” status through a form field - it doesn’t seem possible to overwrite the channel setting for “Moderate comments?”.  I noticed in the exp_comments table that the status is set to either “o”, “p”, or “c”, so I tried using “c” in a hidden input field, but that didn’t work either.

    Can you think of any way I could do this with comments?

    I originally set this up with a Matrix field on the channel entry, but ran into a few problems with this since I want to record the person who submitted the comment and the time it was submitted.  I was passing through this information with hidden input field, but ran into lots of blank rows being created.

    Thanks for your help!

  • #2 / Sep 24, 2012 1:22am

    Kevin Smith

    4784 posts

    Hi Stephen,

    It doesn’t appear like it’s possible to set the status of a comment from the submission form, though you lay out a pretty reasonable case for it. Would it be possible instead to make each ticket update its own channel entry, using relationships to relate all the follow-up channel entries back to the initial opening message?

  • #3 / Oct 04, 2012 12:22pm

    Stephen T

    127 posts

    Hi Kevin,

    Thanks for getting back to me. Sorry for the delay in responding. Yes, I could figure out a way to use channel entries and relationships for the “comments”, but I’d love to be able to use the commenting system to handle this since it seems like it would be exactly what I need if I could just set the status from the front end form.  I’ll submit a feature request for this.

    Thanks!

  • #4 / Oct 05, 2012 4:18pm

    Dan Decker

    7338 posts

    Hi Stephen,

    Yes indeed, please make a Feature Request!

    Is there anything else I can assist you with?

    ~

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases