I have only the first select up and running. Need help for the second. Can it be done only with PHP or it requires javascript or ajax? I'm using Wordpress btw.
function sellers_area_selection()
{
$args = array(
'post_type' => 'seller',
'taxonomy' => 'nomos',
'hide_empty'=> 0,
'parent' => 0
);
$categories = get_categories( $args );
if ( $categories ) {
echo '<select id="nomoi-select">';
echo '<option selected="" disabled="" value="0"><span>Νομοί</span></option>';
foreach ($categories as $category) {
$id = $category->term_id;
$name = $category->name;
echo '<option class="nomos" id="'. $id .'">'. $name .'</option>';
}
echo '</select>';
}
}