Related dropdowns using table ID's

hi - I have 2 supabase tables; builders & sites, each builder can have many sites. the table stuctures are

BuilderID, BuilderName,

SiteID, SiteName and BuilderID as the foreign key

I want to have 2 dropdowns. one to choose a builder (this will show builderName) the other to show siteName (but only show records where the builderId is the same as the builderID in the builders table.

because the widget only shows the builderName (not the Id) i cant see how to link the 2)

if i showed both columns in the dropdown, to link them how would i do this, and then how would i hide the BuilderID so it didnt show ?

Thanks

2
4 replies