*

vansebas

  • ***
  • 35 posts
Country/Region/City select box on profile page
« on: March 10, 2021, 07:47:05 PM »
On the profile page I want to show three select boxes with Country/Region/City.
I have three boxes with the values in it with the code below, there is only one problem.
For example I have selected the country "The Netherlands" and I selected a region. If I switch the country to another country the region select box (and city select box) doesn't reset and fill with the regions/city's from the new selected country.

What am I doing wrong?

This is the added code for the three select boxes:
Code: [Select]
<div class="row">
<label for="Country"><span><?php _e('Country''gamma'); ?></span></label>
<div class="input-box"><?php UserForm::country_select(osc_get_countries(), osc_user()); ?></div>
</div>

<div class="row">
<label for="Region"><span><?php _e('Region''gamma'); ?></span></label>
<div class="input-box"><?php UserForm::region_select(osc_get_regions(), osc_user()); ?></div>
</div>

<div class="row">
<label for="City"><span><?php _e('City''gamma'); ?></span></label>
<div class="input-box"><?php UserForm::city_select(osc_get_cities(), osc_user()); ?></div>
</div>

Marked as best answer by vansebas on March 18, 2021, 07:46:20 PM
*

MB Themes

Re: Country/Region/City select box on profile page
« Reply #1 on: March 15, 2021, 08:26:51 PM »
@vansebas
You are missing javascript that will be doing auto-refresh of regions & cities, once you choose parent entry.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

vansebas

  • ***
  • 35 posts
Re: Country/Region/City select box on profile page
« Reply #2 on: March 18, 2021, 07:46:16 PM »
That's it, so simple that I forgot  :'(
Added the javascript and everything is working fine