Use info from one dataset to fill the user inputs for another

Hey there, I want to use the info from one dataset to fill out the user input fields on a form to submit to another dataset.

What code would i use for this?

Sounds like it should be doable with a simple query.

https://www.wix.com/velo/reference/wix-data/query

Do the query, then put the results into the input field values.