How to add logged in member to a form field.

I need help with this ASAP!!!

I have a form and all the I need is the current logged in users first and last name in the form input. Can anyone help please?!?!?!?

1 Like

You can use the members api to get the id of the current logged in member. Then query the private members database and retrieve their name and then fill in the form fields.

Here is links for resources on how to do so. If you would like code example let me know.
getMember()
wixData.query()

2 Likes

I am not a developer but using the Dev Mode to add code to a page. I used the script from a previous forum post about adding a logged in members info to a form field. I added that script and when I access the form, the user id shows up—success!----but then goes away after a couple of seconds. How do i make the info stay on my form?
Thank you

If you’re able to share your code, someone will be able to help out :slight_smile:

I also recommend opening a new topic with the question too