I used custom code to populate a dropdown function lager_kategorien_werte($form) { global $wpdb; $mydb = new wpdb(DB_USER, DB_PASSWORD, 'mydb', DB_HOST);
$query = $mydb->get_results("SELECT DISTINCT kategorie FROM moebel_abfrage ORDER BY kategorie ASC", ARRAY_A); $options = array(); foreach($query as $row){ $options[] = array('label' => $row['kategorie'], 'value' => $row['kategorie']); } $options[] = array('label' => "Andere Kategorie", 'value' => "neuKat");
How can I create a conditional field in my form that is only shown when the value "neuKat" (or any other value in the dropdown) is selected? I cannot see the labels and values in the form administration page.