Search...
onPostMoved( )
A backend event that fires when a forum post is moved.
Description
The onPostMoved()
event handler runs when an existing forum post in your site is moved
to a different category. The received MovedPost
object contains information about the post that was moved.
Note: Backend events are not fired when previewing your site.
Syntax
function onPostMoved(event: MovedPost): void
onPostMoved Parameters
NAME
TYPE
DESCRIPTION
event
MovedPost
Information about the forum post that was moved.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
A backend event that occurs when a forum post is moved
Copy Code
1// Place this code in a file named events.js2// in the Backend section of your code files.34export function wixForum_onPostMoved(event) {5 const movedPostId = event.postId;6 const oldCategory = event.previousCategoryId;7 const newCategory = event.currentCategoryId;8 console.log("Post moved");9}