My search starts with selecting a location and then the city. If i select Texas and then try to select a city in Texas it tries to show me all cities from all regions. How can i only have it show the cities in Texas.
This is my search code in header.php :
<div class="main-search">
<div class="cell c1">
<?php $aRegions = Region::newInstance()->listAll(); ?>
<?php if(count($aRegions) > 0 ) { ?>
<select name="sRegion" id="sRegion">
<option value=""><?php _e('Choose a location...')?></option>
<?php foreach($aRegions as $region) { ?>
<option value="<?php echo $region['s_name'] ; ?>"><?php echo $region['s_name'] ; ?></option>
<?php } ?>
</select>
<?php } ?>
</div>
<div class="cell c2">
<?php $aCities = City::newInstance()->listAll(); ?>
<?php if(count($aCities) > 0 ) { ?>
<select name="sCity" id="sCity">
<option value=""><?php _e('Choose a city....')?></option>
<?php foreach($aCities as $city) { ?>
<option value="<?php echo $city['s_name'] ; ?>"><?php echo $city['s_name'] ; ?></option>
<?php } ?>
</select>
<?php } ?>
</div>
<div class="cell c3">
<button class="btn btn-primary"><i class="fa fa-search"></i> <span><?php _e("Search", 'sigma');?></span></button>
</div>
</div>