Link an image reference field

Hi all, for some reason i have never got to grips with reference fields but feel i need to, to complete this next mini project.

I would like to allow users to choose a country flag from one collection and link / reference the chosen flag to a main (primary) collection so that the row of data in the primary collection still relates to the user.

The flags would be uploaded first into a new flags collection and displayed on a new page, where user would choose one flag and that flag would be inserted into the primary collection along the same row where the others primary user data is collected.

Update: So i have now created the reference field in my primary collection and linked to national flags collection. In order for only one flag to be chosen by user and linked to the reference field in the primary collection do i create an individual image field for each country in the secondary collection or create a single image field in the secondary collection and upload country flags for each row?

For user to select a country flag, i intend to show all the flags on one page and onClick show the flag selection and then add a button to somehow insert into reference field. I can see that i’m also going to have to reference the user row also from the primary collection or will I? so that a selected flag is referenced in the right primary user row.

Advice very much appreciated.

Thanks
Adam

Hello Adam.

Creating a single image field in the secondary collection and upload country flags for each row will be more appropriate.

You can have user info in a third collection and add a reference field from the primary collection to the user info collection. Inside the flag onClick event, you can insert flag and user info to the primary collection using the respective IDs .

Feel free to check out Corvid examples here .

Good luck!