I was curious about this, and found this post:
http://www.wprecipes.com/wordpress-hack-insert-comments-programatically
You could accept the form input, then use the gform_after_submission hook to insert the comment into the database. You'd need the post ID from the page/post where the form was embedded (assuming that's where you want the comment to be posted.) But the rest seems fairly straightforward. If you are allowing comments from visitors on the site, this would work. If you require your visitors to be logged in before commenting, then I would make the form require a logged in user as well, so they cannot post a comment with your form without being logged in (I suspect it would just not post the comment if the user is not logged in when attempting to post a comment with your form.)
While Gravity Forms is not designed to allow comments on posts, it appears it is possible to do so with some code and the gform_after_submission hook. http://www.gravityhelp.com/documentation/page/Gform_after_submission
Posted 11 years ago on Tuesday May 28, 2013 |
Permalink