Dropdown's default value doesn't show pre selected

I have a dropdown where user selects country code. I have set the default to be India code.

However, when the dropdown loads, it shows up blank. When I click on the dropdown India code is shown pre selected, but I still need to select it. And until I do this task dropdown shows empty value and also if I submit the form without changing that it takes empty value instead of default value.

How is this fixed?

I was having the same problem and this is how I solved. On submit button work flow, I did not include the dropdown and I made a separate step to save it. And I added a condition to only save it if the dropdown’s value is not empty.

Capture

I am new in bubble so others might suggest an easier way to do it. The problem with this method that I have to make separate steps for each dropdown in the form.

If you set a default value for a dropdown then it should load with that value already selected (as you’d expect).

I just tested this on a test app and it works exactly like it should for me.

So perhaps you’ve not set it up correctly? Maybe post a screenshot of your dropdown settings so I can see if everything is as it should be.

1 Like

After reading your comment I just realized I didn’t put the value on default. Instead I put it on placeholder. That’s why it wasn’t working :slight_smile:
I fixed it now and its working. Thank you.
@mghatiya

1 Like

Great to hear you’ve got it working now :slight_smile:

Thanks for nudging me to look at my set-up more closely.

It indeed was my own doing. Dropdown was setup correctly, but there were other issues.

There were two places it was happening and that’s why I thought it is behaving itself like that.

In first place, the dropdown’s default value was set to a thing’s field’s value correctly. However, the thing was not setup correctly to have its field have a default value, causing it to become blank.

In second case also dropdown’s settings were correct, but the default value was pointing to wrong custom state of the element.

Thanks,
Mukesh