onPostOpened( )


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

The onPostOpened() event handler runs when an existing forum post in your site is opened. When a forum post is open, members can comment on the post. The received OpenedPost object contains information about the post that was opened.

Notes:

  • By default, forum posts are open.

  • Backend events are not fired when previewing your site.

Method Declaration
Copy
function onPostOpened(event: OpenedPost): void;
Method Parameters
eventOpenedPostRequired

Information about the forum post that was opened.

A backend event that occurs when a forum post is opened
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onPostOpened(event) { const openedPostId = event.postId; console.log("Post open to comments"); }
Errors

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

Did this help?