Thanks I have tried to get it to work for a dropdown but with no luck. Here is what I have tried:
add_filter('uwpqsf_tax_field_dropdown','custom_select_output','',12);
function custom_select_output($html,$type,$exc,$hide,$taxname,$taxlabel,$taxall,$opt,$c,$defaultclass,$formid,$divclass){
$eid = explode(",", $exc);
$args = array('hide_empty'=>$hide,'exclude'=>$eid, 'hierarchical' => true, 'parent' => 0 );
$taxoargs = apply_filters('uwpqsf_taxonomy_arg',$args,$taxname,$formid);
$terms = get_terms($taxname,$taxoargs); $count = count($terms);
if($type == 'select'){
$html = '<div class="jas '.$defaultclass.' '.$divclass.' tax-select-'.$c.'"><span class="taxolabel-'.$c.'">'.$taxlabel.'</span>';
$html .= '<input type="hidden" name="taxo['.$c.'][name]" value="'.$taxname.'">';
$html .= '<input type="hidden" name="taxo['.$c.'][opt]" value="'.$opt.'">';
if(!empty($taxall)){
$html .= '<select id="tdp-'.$c.'" class="tdp-class-'.$c.'" name="taxo['.$c.'][term]">';
$html .= '<option selected value="uwpqsftaxoall">'.$taxall.'</option>';
}
if ( $count > 0 ){
foreach ( $terms as $term ) {
$selected = $terms[0]->term_id;
$html .= '<option value="'.$term->slug.'">'.$term->name.'</option>';
$args = array(
'hide_empty' => false,
'hierarchical' => true,
'parent' => $term->term_id
);
$childterms = get_terms($taxname, $args);
foreach ( $childterms as $childterm ) {
$selected = $childterms[0]->term_id;
$html .= "<option value='".$childterm->slug."'".">-" . $childterm->name . '</option>';
}}
}
$html .= '</select>';
$html .= '</div>';
return $html;
}
}