Hi,
the DTD options are loaded with AJAX and they do not have to the Custom Fields from scheme so cannot use the placeholder from your CF configuration.
To force the placeholder on DTD you would need to open file dependant-taxonomy-dropdown.php go to line about 269 and replace
adverts_field_select( array(
"name" => $taxonomy . '_' . $i,
"empty_option" => true,
"empty_option_text" => "",
"options" => $options,
"class" => "",
"value" => $selected
) );
with something like
if( adverts_request( "taxonomy" ) == "advert_category" ) {
$eot = "Select Category ...";
} else {
$eot = "";
}
adverts_field_select( array(
"name" => $taxonomy . '_' . $i,
"empty_option" => true,
"empty_option_text" => $eot,
"options" => $options,
"class" => "",
"value" => $selected
) );
Thanks this worked for only advert category How can I apply it to advert location.
The second placeholder should be advert location.
I am using the maps and location addon but my setting is saved at (Use dropdown filled with Location taxonomy).
-
This reply was modified 5 years, 6 months ago by
teeboy4real.
To apply this to other taxonomies as well you need to expand the “if” statement
if( adverts_request( "taxonomy" ) == "advert_category" ) {
$eot = "Select Category ...";
} else if( adverts_request( "taxonomy" ) == "advert_location" ) {
$eot = "Select Location ...";
} else {
$eot = "";
}