Import User name from ( wix-data ) to ( Database Collection )

Hi,

I am wondering if I can import some information such as the user name and his email to a database collection.

basically, on my website there is a form can be submitted by the logged in users only, and this form linked to a data collection, the issue is I can’t know who submitted the form because there is no name or email showing there just the Owner ID which is very complected to know who is he, so I want to import these details ( email and user name ) from Wix-data to the data collection automatically just after the user submitted the form.

I am not sure if this something needs to be done by hooks or a different way?

Appreciate it if anybody can guide me.

What dataset have you got the users details stored in as they are already logged in to the site, you can simply look at pulling their info from your dataset and automatically having it already set as a user input field on your form.

See here for more info and a sample for you.
https://www.vorbly.com/Vorbly-Code/WIX-CODE-AUTO-FILL-FORM-WITH-USER-INPUTS