User input, multiple choices coming from db collection

Hello everyone,
honestly tried to search this up, couldn’t find enough details to accomplish this without some help fro the community.

My tasks is to collect user input [and eventually store it in a collection] in a “multiple choices” situation where choices are coming from some other collection.
Say, I have a collections “Languages” [Title, ID] and “Student” [LastName, FirstName, ID, LanguagesSpoken]

What I was trying to get done was to create a CheckboxGroup, connect it to collection “Languages” [Title], allow user to choose one(many) languages by checking those boxes
and eventually save choices in my “Student” collection.

Perhaps my concept is not entirely correct, is CheckboxGroup the best option to visualize “multiple options” choice?
is column “LanguagesSpoken” going to be of type “Tags”?
could I somehow utilize ref.integrity model supported by Wix?

/* I am actually a database person simply trying to create a “one-to-many” relationship. */

Thanks in advance.

There are many a Wix Tutorial, either from them or a Wix Expert via Youtube video, about what you are requesting.

As for the use of check boxes, there are different user inputs you can use like check boxes, radio buttons or drop downs, the choice is yours entirely, whatever best suits and works perfectly on your website

https://support.wix.com/en/article/about-referencing-multiple-items-in-one-field
https://support.wix.com/en/article/working-with-multiple-item-reference-fields

https://support.wix.com/en/article/working-with-user-input-elements-9560341
See radio buttons, check boxes and drop downs from the above list for a lot more info

https://www.wix.com/corvid/reference/draft/$w.Checkbox.html
https://www.wix.com/corvid/reference/draft/$w.RadioButtonGroup.html
https://www.wix.com/corvid/reference/draft/$w.Dropdown.html

https://www.youtube.com/watch?v=kc1YBFG2tXA
https://www.youtube.com/watch?v=r0DLqkRDJ34
https://www.youtube.com/watch?v=EhXed0u6wh0
https://www.youtube.com/watch?v=-nMeGbXAdrc
https://www.youtube.com/watch?v=PIWb6nGR5Lk

https://support.wix.com/en/article/corvid-tutorial-adding-custom-interactivity-with-events
https://support.wix.com/en/article/corvid-tutorial-creating-a-form-to-store-user-input-in-a-database-collection

If you want to learn about how to search your datasets, then read about the Wix Data Query:
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html
https://support.wix.com/en/article/corvid-working-with-the-data-api

@givemeawhisky

my apologies for this belated response,
thank you for all the info, tons of useful data,
still I am a bit lost trying to figure out what would be the most efficient way to address my needs.

so, getting back to description of my initial task:
column “Student”.“LanguagesSpoken” should be of type “Reference”,
there I have to store 1…n _id values from “Languages” collection

what was done:

two tables created on this page,
one is connected with “Languages” via a dataset,
another is just a regular table with two columns - “Language” and “_id”
[choose] button click copies both “Language” and “_id” values from first to the second table,
[submit] button is supposed to save the info in “Student” collection as it is defined as dataset.submit

_afterSave function has to process second table, place all “_id” values in an array of references and save it in “Student”.“LanguagesSpoken” by calling wixData.insertReference
a minor issue here is that _afterSave is applicable to the dataset, but “insertReference” deals with collection.
I meant to use dataset getCurrentItem() function here.
still having troubles arranging my set of references, couldn’t find a solid example for this,
do I need to convert “_id” to a string before pushing it to array?

What do I miss?