Hi! I’m building a comments section on a members page only on my site and since the person already had to login to access the page, I would like that the name and the picture fields to be already filled in with their data, and also the comments to have the names and the pictures of the respective members who wrote them. I will be grafeful if someone could help me
I will explain what I have.
First, I put 3 datasets: Members (dataset1), Read (dataset2, which is read-only), and Write (dataset3, which is write-only). Members is connect to PrivateMembersData. Read and Write are connected to the same database, Comments , which has Picture , Name , Comment and Rating fields.
I did my connections this way: The comment and the rating fields of the form are connected to the the their respective fields on the Write dataset, meanwhile the comment and the rating fields of the repeater (comments section) are connected to the same fields, but on the Read dataset. This works fine, except that the data does not automatically refresh after a comment is sent by hiting the submit button, even after I’ve tried multiple codes.
Then, I connected the picture and the name fields of the form to their respective fields on the Members dataset (PrivateMembersData), which apperently works fine according to the member who is logged in, but I have my doubts if I should have made the connections this way, because when I logged in once with a site administrator account, these fields were assigned to the data of the first registered member of my site, so I guess the connections might be wrong.
And then what completely doesn’t work is the name and the picture fields of the repeater. When I connect them to their respective fields on the Read dataset, they appear completely blank after the comment is sent, what I already expected, since there’s no connection between the Comments database and the PrivateMembersData database (1st picture down below). But when I connect them to their respective fields on the Members dataset, they appear only with the name and the picture of the member currently logged in and not the member who actually commented (2nd pic down below).
I imagine what should be done is to create a way to automatically export the data from PrivateMembersData to the Comments database whenever a new member is created and to find a way to the data identify who commented and which photo is that person, so as to be registered exactly which member did it, but I still haven’t found exactly how to do it, and also I’m new into coding.
A big thanks to anyone that will comment here to help me!