I’m working on a Wix site and want to create a functionality using Wix Velo (Corvid) where users can select a language and their proficiency level in that language from dropdown lists. The languages and proficiency levels are stored in separate Wix Data collections named Languages
and LanguageLevels
, respectively. I also have a UserLanguagePreferences
collection to save the user’s choices, which should be linked to the user’s profile stored in the Register
collection.
Here’s what I aim to achieve:
- Load Languages and Levels into Dropdowns: On a specific page, users should see two dropdowns. The first dropdown (
#dropdownLanguage
) will list languages from theLanguages
collection. The second dropdown (#dropdownLanguageLevel
) will list proficiency levels from theLanguageLevels
collection. How do I dynamically load these options into the dropdowns when the page loads? - Saving User Selection: Once a user selects a language and a proficiency level, I want to save this selection to the
UserLanguagePreferences
collection upon clicking a “Save” button (#saveButton
). Each entry inUserLanguagePreferences
should link to the user’s ID from theRegister
collection, the selected language, and the selected proficiency level. How can I efficiently capture and save these selections? - Linking to User Profile: After saving the language and proficiency level to
UserLanguagePreferences
, I need to ensure this data is associated with the specific user in theRegister
collection. Ideally, this linkage would enable displaying the user’s language choices, including the proficiency level and language icon, on their profile page dynamically. What is the best approach to link these collections and display the selections on the user profile page?
Could you provide guidance or examples on how to implement these functionalities using Wix Velo? Specifically, I’m looking for advice on dynamically loading dropdown options, saving user selections to a collection, and linking these selections back to the user’s profile in an efficient manner.