'wp_dropdown_categories populate with name and term fields

I have a taxonomy which has 3 term fields included (Variation 1, Variation 2 and Variation 3). I would like to create a dropdown menu showing the name and these term fields together seperated by a delimeter ex: /

So you will end up with name/Variation 1/Variation 2/Variation 3

This is my code so far where I successfully managed to get the name.

function get_all_children(){
if ( isset($_REQUEST) ) {
    $p = $_REQUEST['parent'];
    $l = $_REQUEST['level'];
    $args = array(
        'show_option_none' => ' ',
        'child_of' => $p,
        'hide_if_empty' => true,
        'orderby' => 'name',
        'depth' => 1,
        'echo' => 0,
        'hierarchical'    =>  true,
        'taxonomy' => 'collection',
        'name' => $l,
    );              
    
    $children = wp_dropdown_categories( $args );
    echo $children;

}

die();

}

Any help is appreciated



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source