onPostReported( )


A backend event that fires when a forum post is reported.

The onPostReported() event handler runs when a site visitor reports a post on your site. The received ReportedPost object contains information about the post that was reported.

Note: Backend events are not fired when previewing your site.

Method Declaration
Copy
function onPostReported(event: ReportedPost): void;
Method Parameters
eventReportedPostRequired

Information about the forum post that was reported.

A backend event that occurs when a forum post is reported
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onPostReported(event) { const reportedPostId = event.postId; const typeOfReport = event.reportType; console.log("Post reported"); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?