How to connect search result to user input?

I want the user to be able to search a database collection (I know how to do this), and then to have user input fields propagated so that the database can be edited (I don’t know how to do this).