Automatically submit user info

Hi,
If I have a survey on my site (a User Input form) and I like it to automatically write the member info to my database together with the user’s input, how can I do it? (I don’t want to ask the users to fill in their info again, I just want to use extract the CurrentUser info from wix-users and write it to the database once the users click submit.)

Thank you,
J.D.

#wixUsers , #UserInput , #automatically , #submit , #CurrentUser

in collection there is already automaticly column owner. OWner is User id. When You are logged in You have Your ID. Go to collection and make visible this column You will see it.

@ceglarnia , thanks. I didn’t know that. I’d like to have there the user email as well. How can I do that?

let user = wixUsers.currentUser;

let userId = user.id;
var userEmail;
user.getEmail()
.then( (email) => {
userEmail = email;
console.log(userEmail); // “user@something.com
} );

when You have userEmail you can now save it in dataset

Thank you, @ceglarnia

Hello. I did it but it shows only ID (numbers with letters). I want to know the which ID belongs to which member.