Search.../

onCommentUnmarkedAsBest( )

A backend event that fires when a forum comment is unmarked as best.

Description

The onCommentUnmarkedAsBest() event handler runs when an existing forum comment in your site is unmarked as best. The received UnmarkedAsBestComment object contains information about the comment that was unmarked as best.

Notes:

  • Only comments on posts with a postType of "QUESTION" can be marked and unmarked as best.

  • Backend events are not fired when previewing your site.

Syntax

function onCommentUnmarkedAsBest(event: UnmarkedAsBestComment): void

onCommentUnmarkedAsBest Parameters

NAME
TYPE
DESCRIPTION
event
UnmarkedAsBestComment

Information about the forum comment that was unmarked as best.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

A backend event that occurs when a forum comment is unmarked as best

Copy Code
1// Place this code in a file named events.js
2// in the Backend section of your code files.
3
4export function wixForum_onCommentUnmarkedAsBest(event) {
5 const unmarkedCommentId = event.commentId;
6 console.log("Comment unmarked as best");
7}