javascriptwordpressbuddypress

How to obtain a current page data to imitate a Reply message in discussions?


I want to add a special widget (e.g. in the start message) which will be have a Submit button. The user interacts with widget, then presses this button and the widget should add a result as a reply message.

The reply form sends a post request with some parameters. Where can I grab it? enter image description here

Maybe there is a some plugin with such a feature?


Solution

  • I found these props as hidden form fields. I don't know how I missed them at first.

    Hidden parameters

    For feeds the similar information is stored in a global variable BP_Nouveau.

    console.log(BP_Nouveau.activity.params);