Registration Form Foreign Key

I added some columns to the user table. Specifically I want a nick name, and I want their preferred time zone.
In the registration process, I want them to “pick” their preferred time zone from a dropdown list, which gets its data from a separate time zone table.

In my user table, I have added a column called UserTimeZone and the data type or type is TimeZone; which means to me it’s kind of like a foreign key back to a row in the TimeZone table.

I need help… I can get dropdown to display the list of time zones from the time zone table…but how do I set the value of the UserTimeZone column in the user table to the value of the drop down???

Here’s some pictures
ForeignKeyLess in Florida

When you say not an option, what do you mean? The dropdown doesn’t show up in the list of elements when you click on the “Click” text?

It’s greyed out… I can see it, but I can’t select it???

What does the dropdown have a source ?

Dropdowns can be a source of data. Can you show us the settings on the dropdown? Bubble is saying it’s an incompatible type, which should be easy to resolve.

The source for the dropdown is the table of valid time zones (the name column in particular)

So again there’s a table of valid time zones
One column in the user table is of data type “time zone” (shown above); I’m not sure what the REALLY mans?
On the form to create a new user, in addition to the other inputs, the dropdown timezone assure only a valid list of time zones, from the time zone table can be selected

See the image here:

The source for the dropdown is the table of valid time zones (the name column in particular); using a table of valid values as the source for the dropdown assures nobody fat fingers anything…and I “THOUGHT” it would set up an FK relationship from TimeZone to User

See the image here:

You actually don’t have the drop-down using Timezones, you have it using texts, that you’re pulling from the search for Timezones.

You need to make the Type of Choices into timezone, then change choices source to Search for Timezones, then change Option Caption to Current Options TimeZoneName

Andrew - thank you for your help here. Is there some tutorial on this, on how to set the settings for a dropdown to use it to set up a sort of key relationship?

You saw that in the user table, the data type for TimeZone was TimeZone, so my question is this… if a user is logged in, and they go to the user profile page I’ve created — will setting the dropdown settings as you suggested show their currently selected time zone??

The labels on the dialog to set the settings for a dropdown could never clearly convey enough meaning to set it up correctly, which is why I asked for a video.

I’m not sure I understand your question here. Could you try rephrasing?

I have a picture below that will help. I do sincerely appreciate your help. I’m having a tough time understanding how the application manages it’s relationships and how interact with data across tables.

I have a separate table of TimeZones so I can keep a unique list of time zones.

In the user table I added a column and the data type is TimeZone, and it represents what one specific time zone the user is in. A user can only have one, no more than one preferred time zone.

So I have a profile page to display and edit user information. Along with the user nickname, email, marketing opt in, preferred time zone, etc. - My question is this: when I display the time zone the user has already chosen, I want to display it in a dropdown so I’m assured if the user wants to change their preferred time zone, they pick or select it from the dropdown (not free text entry). HOW can I set the dropdown to display the time zone the user has already chosen, the time zone stored in the user table? (the foreign key)

Thanks Again - this software really isn’t easy to use and my use cases are typical everyday use cases; so I appreciate someone who has the inside knowledge on how this works

On the user profile page, you’ll have a dropdown for Timezone. In the “Initial Content” field of the property editor, make sure you specify “Current User’s Timezone’s TimeZoneName” as the initial content. That should do what you want.

1 Like

Thank you so so much…
I wish the software documentation was better

WAIT… dropdown dialog does not have a “Initial Content”???

There’s a placeholder input, is that it???

Yeah, that should do it. Sorry, I’m not buy a computer.

Bubble definitely has a learning curve, especially if you’re coming from regular software engineering. I highly recommend taking some of the video courses, and if you haven’t, follow everything @romanmg does over at

Placeholder = what goes in the dropdown when there is no default value set so text “Enter your Time Zone…”…

Default = what actual timezone is initially in the input as a default (so this overrides the above).

However, if you use autobind, you can bind the input to the Current User’s Timezone and you will update the database value as they change the dropdown automatically.

In your dropdown “Type of choices” … you actually want the list of Timezones (so a list of objects/things/rows) not the TEXT of those objects.

So the dropdown is a list of objects (and you can display a text field so they can select the right one) and that means you can do more complex operations (like autobind) but also query the object and the relationships.

So "Dropdown Timezone’s Timezone’s Country’s Capital City " for example.

1 Like

Thanks for correcting me on this one. I realized I was wrong once I opened up my editor this morning. I just popped in to correct my post, but ya beat me to it!

1 Like

Thank you for the details that, well should be in the documentation… but uh, HOW SAD!

It is… Have you ever seen this:

Yeah, you are of course right.

But Bubble is relatively young in software terms, there is the reference as detailed above (which is open for community editing) and the wonderful forum of course :slight_smile: