Comments on blog page for registered users

I have a website for research purposes where I want registered users to comment on individual blog posts. I found this tutorial which almost does exactly what I need: https://www.wix.com/corvid/example/custom-comments

The only difference is that I don’t want my participants to have to input their name every time they comment (many will be people with dementia). So instead of having them input their name I want to query the author of the comment from the private members database, input that information in my database along with their comment and then display their comment with their username in a repeater on the blog post page that the comment was made about.

Any insight and help would be greatly appreciated!

Hello,

Start from checking out the article below:

Corvid: Working with Wix App Collections and Code

You can definitely query the PrivateMembersData collection by the user ID and then just use insert() on the comment form submission to submit the information altogether.

https://www.wix.com/corvid/reference/wix-users.User.html#id - wix-users API, id specifically.
https://www.wix.com/corvid/reference/wix-data.html#query - wix-data API, query() specifically.
https://www.wix.com/corvid/reference/wix-data.html#insert - insert() function.
Corvid: Wix Members “PrivateMembersData” Collection Fields - How to use the PrivateMembersData collection in code.

This forum post should be also helpful, it shows how you can populate the name of the user to a text element.

Good luck!