Search Bar Select Parent then Child Ad Categories
I would like to first select the parent category in a search drop down. After choosing that I want to be able to select a child category of the parent category selected in the next drop down. The second drop down needs to be populated with child categories from the parent category selected.
Is there any way to modify the following code to do this: (code from theme-searchbar.php lines 28 through 35)
<div class="searchbutcat">
<button class="btn-topsearch" type="submit" tabindex="3" title="<?php _e( 'Search Ads', APP_TD ); ?>" id="go" value="search" name="sa"><?php _e( 'Search Ads', APP_TD ); ?></button>
<?php wp_dropdown_categories('show_option_all='. __( 'All Categories', APP_TD ) .'&hierarchical='.get_option('cp_cat_hierarchy').' &hide_empty='.get_option('cp_cat_hide_empty').'&de pth=0&show_count='.get_option('cp_cat_count').'&pa d_counts='.get_option('cp_cat_count').'&orderby=na me&title_li=&use_desc_for_title=1&tab_index=2&name =scat&selected='.cp_get_search_catid().'&class=sea rchbar&taxonomy='.APP_TAX_CAT); ?>
</div>