Saving dropdown information to collection

Hello

I created a custom form and added a custom cascading drop-down box using this code as a reference( https://www.wix.com/velo/example/cascading-form ).
It works perfectly, but when I connect the drop-down to the collection so that the selected information would save in the collection, but it only stores the id of the selected option instead of the name. I figured it out that the code does not define how to store the data, could you help me add that to my code so that I can store the options selected to my collection?