How to add field value into content collection with form

Hello,

I created a repeater that lists returned objects with values that references a content collection.

I then created a text box with a submit button so users can provide feedback for that object.

What I am trying to figure out is how I can add the object’s name along with the feedback when a user clicks on the submit button.

Is there a way to use code to add one of the fields retrieved from a source content collection that is used to display the objects into the feedback content collection?

For example, let’s say the following is displayed from a search:


Author: John Smith
Book Title: Hello World

-Feedback-
Please enter your feedback into this text box
[Submit Button]


When the user hits the Submit button, the Feedback the user typed into the text box is added to the content collection but I also want to add the Author John Smith into the content collection as well.

Thanks.

The following examples demonstrate different methods which you can adapt for your use: