I’ve populated the lables and values of a dropdown field with dynamic content, that is coming from supabase with a collection in weweb.
The field is populated correctly, yet I can’t manage to write the value of the current selection of the dropdown field in a variable. It works perfectly fine, when I’m using fixed lables and values, yet I’m stuck doing the same with dynamic content.
Is there a special process, or workaround to do that, since the value for the binding never shows up in the weweb interface,.
Thanks for your reply.
My goal: To generate expandable rows where you can configure a few things with dropdown fields and radio buttons. Each expandable row stands for a social media platform. What kind of platform (expandable rows) the user sees, depends on a “supabase view” that holds the necessary information in a weweb collection (dynamically) and is show through a repeated (list). If a user has set up 2 channels, he will only see these two channels.
Each platform (expandable row) that the user sees, has the same set of input fields (dropdown) which labels and values are also drawn form lookup tables via a supabase collection. So far so good.
What I try to archive is, to save the values for each platform in a variable, that can then be passed on via API. Yet since the expandable rows created with a repeater, I can’t figure our how to pass on the current value of dropdown field. This shoud happen “on change” –> change variable value (test_value_dummy)
Whenever I try to bind the value information of a dropdown, I can’t see the dropdown in the binding list. This only happens with input fields that are in the “repeater”. As soon as I move the field outside the “list”, I can select the dropdown field and it’s value to pass it on to the variable.
The good news, I managed to archive the setup without a repeater “list” but with ‘conditional rendering’.
My preferred way your be with a “list” since is would allow me to stick with lookup tables rather than adjusting the frontend in weweb whenever a add something.
A couple of thoughts and things you might want to check or try:
Dropdowns inside Repeaters: You mentioned that binding the dropdown value to a variable works outside a repeater, but not inside. This is a common challenge: in repeaters, each row is its own context. If you try to use a single variable, every item will try to write to/read from the same variable, causing conflicts.
Have you tried binding the dropdown selection to item.data or a property unique to each row/item instead of a global variable?
Sometimes, using a “set variable” workflow inside the repeater with something like item.index as an identifier can help ensure values don’t overwrite each other.
Passing Values via API: If you need to send the selected values from each row, your collection of values should ideally be an array (or object) indexed by the item or row key. Are you currently storing each selection in a unique object per row?
Debug Tip: Try adding a text element inside the repeater, bound to the value you want to save from the dropdown. This can help visually confirm if the selection is actually being recorded per row as you expect.
Structure Confirmation: Double-check that your options’ value binding (Mapping.value.id) and label (Mapping.value.label_en) are correctly referenced for each dropdown instance.
Sometimes, field mapping can get mixed up if references are not strictly tied to the correct data context.
Not sure any of these will work but perhaps they help you walk towards the right direction.
Thanks for the welcome and the your detailed suggestions.
Unfortunately I still couldn’t figure out how to create a binding that works.
I’ve added 3 more screenshots with some descriptions. I hope this makes sense for your.