Autocomplete and Dr...
 
Notifications
Clear all

Autocomplete and Dropdown for cities

17 Posts
5 Users
4 Reactions
1,240 Views
Johannes de Sacrobosco
(@johannes-de-sacrobosco)
Posts: 83
Member Moderator
 

If someone designed a theme, all 3 options (Country, Location-State-Region and City) should be auto-complete or dropdown by choice of the admin SEPARATELY. One setting for each of the 3.

But most of the time theme designers are developer and not users or webmasters. They care about code and not about the Interface or the Usability.


 
Posted : January 5, 2022 18:23
Editor
(@editor)
Posts: 551
Honorable Member Admin
 
Posted by: @tango

So you want the Region to be dropdown, but the city just an empty field where the user can write anything or nothing at all?

Why not keep the city as a dropdown also?

Is it a problem with the city not being available in database - dropdown list?

Dropdown for Cities is HUGE for some countries, that is why. We try to make it optional/empty.

The  goal is to make it easy for users to select and post. Area Code would be nice so all that wouldn't be necessary but area code is not implemented with Osclass. With Area code is how most (if not all) classifieds sites work all over the world. Dropdown is somehow outdated.

Again thank you for your time to help us here. All of us.

I hope i covered also @Lost with the above.


 
Posted : January 5, 2022 18:31
 Lost
(@lost)
Posts: 11
Active Member
Topic starter
 

Thank you all for the help, this is geting complicated for me.

It seems that there is no easy way to do that, so i will stay with what i have.

 


 
Posted : January 5, 2022 18:53
(@tango)
Posts: 59
Trusted Member
 
Posted by: @editor
Posted by: @tango

So you want the Region to be dropdown, but the city just an empty field where the user can write anything or nothing at all?

Why not keep the city as a dropdown also?

Is it a problem with the city not being available in database - dropdown list?

Dropdown for Cities is HUGE for some countries, that is why. We try to make it optional/empty.

The  goal is to make it easy for users to select and post. Area Code would be nice so all that wouldn't be necessary but area code is not implemented with Osclass. With Area code is how most (if not all) classifieds sites work all over the world. Dropdown is somehow outdated.

Again thank you for your time to help us here. All of us.

I hope i covered also @Lost with the above.

Well, why didn't you say so in the first place?  😋 

The fix is simple:

In bender\item-post.php at lines 37 and 149 replace dropdown with autocomplete.

In oc-admin - Theme Settings keep the input as Dropdown.

Result:


= Osclass Enterprise =

 
Posted : January 5, 2022 19:34
Lost and Editor reacted
Editor
(@editor)
Posts: 551
Honorable Member Admin
 

@Lost can you try the Above suggestions? And let us know?


 
Posted : January 5, 2022 19:51
 Lost
(@lost)
Posts: 11
Active Member
Topic starter
 

@tango Thank you VERY MUCH. Works very well.

👍


 
Posted : January 5, 2022 20:51
Tango reacted
Editor
(@editor)
Posts: 551
Honorable Member Admin
 

Just tried that change with OsclassWizards and there is a difference with Bender.

So here is the information for anyone possibly needing this in the future.

 

The "dropdown" is "select" in OsclassWizards.

 

if(osclasswizards_locations_input_as() =='select'){ 

 

And the "autocomplete" is probably "text" from what i can see in the code in functions.php.


 
Posted : January 5, 2022 20:59
Page 2 / 3