Welcome
Another problem appeared
Unfortunately, the problem with the city is not in the same language as the chosen one
Also, why is the selected search not saved?
this code
<?php ItemForm::region_select(osc_get_regions(osc_user_country())); ?>
<div class="label"><?php _e('City', 'eva'); ?></div>
<select id="sCity" name="sCity" >
<option value=""><?php _e('Select a City...', 'eva'); ?></option>
</select>
And thise
$('#regionId').change(function updateCityList() {
var actualRegionId = $(this).val();
if ( Math.floor(actualRegionId) == actualRegionId && $.isNumeric(actualRegionId)) {
/*Get cities per region*/
$.ajax({
url: "<?php echo osc_base_url(true); ?>?page=ajax&action=cities",
data: { regionId: actualRegionId },
success: function( cities, err){
var $el = $("#sCity"),
citiesOptions = {};
$('#sCity option:gt(0)').remove();
$el.val("");
$el.prev("span").text("Any City");
$.each(cities, function(key, value) {
$el.append($("<option></option>")
.attr("value", value.s_name).text(value.s_name));
});
$("#sRegion").attr("value", $("#regionId option[value='"+actualRegionId+"']").text());
},
dataType: "json"
});
}
});
Thank you all