How do I save responses from a form and show it on another page
-
Hi, I am using NodeBB for a project.
I have already created a page with a form in which users could enter details and submit.
I want these details to show up on a page in the Admins page (the page is already created) however, I am having trouble even saving the form responses. How should I go about this? I already tried creating a database to save these responses, but my attempt was unsuccessful. I am also having issues with API endpoints, which I believe may be the cause of the issue.
Could I save these responses without a database perhaps and maybe just use a controller?
I would really appreciate your help!
-
Yes you dont need a database.
Can code a widget to take the inputs, then directly write this info to a post in your 'hidden' category, that only admin can view.
its quite easy to do in javascriptconst tid = // hidden topic num data = // input data fetch(`/api/v3/topics/${tid}`, { method: 'POST', headers: { 'Content-Type': 'application/json',} body: JSON.stringify(data) } )
The only thing I remember having issue with, was the CSRF token ...