onPostMoved( )


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

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.

Method Declaration
Copy
function onPostMoved(event: MovedPost): void;
Method Parameters
eventMovedPostRequired

Information about the forum post that was moved.

A backend event that occurs when a forum post is moved
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onPostMoved(event) { const movedPostId = event.postId; const oldCategory = event.previousCategoryId; const newCategory = event.currentCategoryId; console.log("Post moved"); }
Errors

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

Did this help?