Advertisement:

Author Topic: Changing to Drop Down Region / City  (Read 1815 times)

rizwan65

  • Newbie
  • *
  • Posts: 49
Changing to Drop Down Region / City
« on: March 30, 2014, 12:55:34 pm »
Hi,
I have installed Latest version 3.3.2 and using Modern theme
I am trying to change Auto Complete to Drop Down  Region/City  fields using the following tutorial

http://doc.osclass.org/Changing_between_drop-down_and_autocomplete_for_locations

but facing some problem

Now New Item Post shows in-complete form
Screenshot attached

Any help please
Regards
Rizwan

calinbehtuk

  • Sr. Member
  • ****
  • Posts: 450
Re: Changing to Drop Down Region / City
« Reply #1 on: March 30, 2014, 01:21:37 pm »
go in
frm.php - which is in oc-admin => Themes => Modern => items where you need to modify the following two lines:

<? php ItemForm :: region_text ();?>
<? php ItemForm :: city_text ();?
>
with
<? php ItemForm :: region_select ();?>
<? php ItemForm :: city_select ();?>


now edit the following files in your theme
item-edit.php
replace
<?php ItemForm::location_javascript_new(); ?>
<?php ItemForm::region_text(); ?>
<?php ItemForm::city_text(); ?>

with
<?php ItemForm::location_javascript(); ?>
<?php ItemForm::region_select(); ?>
<?php ItemForm::city_select(); ?>


and item-post.php
replace
<?php ItemForm::location_javascript_new(); ?>
 <?php ItemForm::region_text(osc_user()); ?>
 <?php ItemForm::city_text(osc_user()); ?>

with
<?php ItemForm::location_javascript(); ?>
<?php ItemForm::region_select(osc_get_regions(osc_user_region_id()), osc_user()) ; ?>
<?php ItemForm::city_select(osc_get_cities(osc_user_region_id()), osc_user()) ; ?>

 
« Last Edit: December 11, 2015, 11:08:48 am by garciademarina »

rizwan65

  • Newbie
  • *
  • Posts: 49
Re: Changing to Drop Down Region / City
« Reply #2 on: March 30, 2014, 05:54:10 pm »
Thanks it worked now

bushido36

  • Newbie
  • *
  • Posts: 10
Re: Changing to Drop Down Region / City
« Reply #3 on: May 12, 2015, 06:27:38 pm »
merci monsieur ;)