Select element in a repeater to update profile picture

Hi guys,

I have a box that contains an upload button and a repeater with 3 options (uploaded pics by the user) for the user to either upload or select a new pic and update his/her profile pic. Also, I have a Save button to close the box and submit the change.

When the user clicks the upload button and selects an image, I would like the user to see the uploaded image placed in the first element of the repeater and at the same time the profile pic behind the box updated with this new pic, then the user clicks save.

To update by selecting a pic already uploaded, I have the same situation, I would like the user to select an image from the repeater and click save and update the profile.

I think my problem is that I don’t know how to call an element inside a repeater.

Thanks!

Wix already do something similar that you can use as shown here.
https://support.wix.com/en/article/wix-code-using-the-upload-button-with-code

However, if you want to use a repeater, then you need to use it with selecting each item in the repeater itself by using the scopes as described in the Wix Repeater API here.
https://www.wix.com/corvid/reference/$w.Repeater.html

Also, for using inputs in a repeater look here and view the example in your own editor where you can enable Corvid and see the page code used on each of the two pages from the tutorial.
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-input-repeaters