Save user's name or id on Recipe dataset

Hi everyone,

I’m having some trouble saving the current user’s name or id on a recipe’s dataset. What I want to happen is when a user fills out the recipe form and clicks submit, it sends the user’s name or id with all the info they entered into the form for the recipe.

The reason I want to do this is so that I can then show the user’s recipes on their profile page by filtering the recipe dataset and display all recipes where the corresponding userID column on the recipe dataset matches the user’s id.

Anyone have any suggestions? Thanks!

I also need this. Anyone?

I need this too, any suggestion ?

Hi guys!
Try using the wix-users API and the method currentUser.
A ‘user’ is an object that has an ‘id’ property. You can access and use the ID of the user to filter/search through databases for it is a unique string for every user.

Hope it helps.
Best of luck!
Doron. :slight_smile: