Currently I’m working on a project and our team would like to give strapi a try. We want to get input from user in form format (just like google form) and save it into the MongoDB. So my question is how to fetch data from MongoDB and display it onto the Admin panel
Welcome to the community Minh Nguyen Quang,
I hope I understand your question, here is what I would do:
Create a Collection Type, and have the fields set to the exact same way as the fields from the MongoDB table.
Example:
MongoDB
TableName: GoogleForms
Columns: id (int)
, first_name (string)
, last_name (string)
, email (string)
, message (string)
Stapi
Collection Type: GoogleForms
Fields: first_name (Text)
, last_name (Text)
, email (Email)
, message (Rich Text)
After you hit Save, Strapi will build the collection type to display on the Admin,
if you setup the fields correctly, you will see the previously stored data in the collection type,
If you didn’t set it correctly, you will see new columns inside your table on MongoDB
Greetings
Thanks you Ben ! I’m really appreciate your help