Search...
onPostOpened( )
A backend event that fires when a forum post is opened.
Description
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.
Syntax
function onPostOpened(event: OpenedPost): void
onPostOpened Parameters
NAME
TYPE
DESCRIPTION
event
OpenedPost
Information about the forum post that was opened.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
A backend event that occurs when a forum post is opened
Copy Code
1// Place this code in a file named events.js2// in the Backend section of your code files.34export function wixForum_onPostOpened(event) {5 const openedPostId = event.postId;6 console.log("Post open to comments");7}