I have installed the wixForum. In the Velo notes it says there are even handlers for wixForum_onPostCreated(event).
I have added the event handler to a backend file called “events.js” as it mentions.
What I need:
I when the user clicks “create new article” and “publish” in the App on the live site, I want to use the post details and send the information to a lightbox.
I know how to open lightboxes and send information to them. I just need to know how to retrieve the information from the wixForum_onPostCreated(event) after the user has clicked “publish”.
- user submits new post
- event fires
- details from the backend event sent to the frontend page the user is on
- I open a lightbox using the data it sends back
Does anyone know how to do this?
These are the details, it says the wixForum_onPostCreated(event) function produces.
Full post object:
{
“_id”: “5f88058be9b6b100175b154c”,
“categoryId”:“5f88058be9b6b100175b154a”,
“_ownerId”:“32cf071a-ck2f-450f-ad74-5a25db0b1b6g”,
“title”: “What topics should we discuss?”,
“plainContent”: “Let us know what you think in the comments below.”,
“pinned”: “false”,
“commentingDisabled”: “false”,
“commentCount”: 0,
“likeCount”: 0,
“viewCount”: 0,
“_createdDate”: “2020-10-26T07:18:20.297Z”,
“_editedDate”: null,
“_lastActivityDate”: “2020-10-26T07:18:20.297Z”,
“slug”: “what-topics-should-we-discus”,
“pageUrl”: “/forum/category-name/what-topics-should-we-discuss”,
“postType”: “QUESTION”
}