Hi @dev101,
Yep, I was looking at the only use of osc_get_cities() -with no region parameter- in Bender vanilla, in user-profile.php and I used Userform:: inadvertedly, same result anyway.
Now I realize the solution you propose is what is recommended here:
https://doc.osclass.org/Changing_between_drop-down_and_autocomplete_for_locationsAnd seems good enough. If it's a non-logged user or a logged user with no location data in his/her profile yet, that would retrieve cities for the first country in the database.
My hack using that dummy array (1,2) intended to save time and skip population of a select that will be overriden later via Ajax call (once you expressly select a region), but seems you need something more there for the neutral option "Select a city" to be shown...
What is totally clear is that osc_get_cities() -with no region parameter- never should be used unless (as in the case on that user-profile.php) already a View variable "cities" has been created.
Thanks for your input, regards.