Filter reference field of a dropdown

I’ve been looking for this solution all day. Hope someone can help.

I have a master parent collection (“Freelancers”) that has hundreds of freelancers. I have just created another collection called “Messages”. My intent is for visitors to be able to come to my site and see the list of freelancers and send them a message, which will get saved in the Messages collection.

The “Messages” collection has a reference field (‘name’) back to the “Freelancers” collection.

So I created a new page with some form fields and just for a simple test created a dropdown and connected it to the new “Messages” collection and set the value to connect to the reference field (‘name’) pointing to “Freelancers”.

This works fine and am able to see the huge list of freelancers. However, I need to be able to filter this referenced field by a boolean value called “currentlyActive”, which is a column in the “Freelancers” collection.

How the heck do I accomplish this? I’ve been banging my brain for 2 days to work this out.

Thanks in advance, I appreciate it!

A few samples for you to read.

https://www.wix.com/corvid/example/cascading-form

Wix Code Tutorial | How to Filter Items on Repeater Using a Dropdown and Boolean Values on Wix Code

https://codequeen.wixsite.com/dropdown
https://www.youtube.com/watch?v=EhXed0u6wh0 - video for above tutorial

Also, as you will be doing it through code, you will need the Wix Dropdown reference for it too.
https://www.wix.com/corvid/reference/$w.Dropdown.html

I appreciate this info and I have reviewed all thoroughly. Think I’m just stuck on how to filter the referenced field of a the first collection with the intention to save it to another collection.

Is there some sample code available for this exact situation?