Is there a way to change select-list for new custom taxonomy?

If someone else stumble upon this kind of question, here’s my solution to it: (without having to mangage any metaboxes etc)

add_action('categorycourses_add_form_fields','categorycourses_edit_form_fields');
add_action('categorycourses_edit_form_fields','categorycourses_edit_form_fields');

//Function only showing parent categories when editing or adding new category-courses
function categorycourses_edit_form_fields() {
    ?>
    <script type="text/javascript">
    jQuery(document).ready( function($) {
       var level = 1;
       //Go down in hierarchy from level1 and remove each level until there are no levels anymore
       //Don't do anything with level-0 because we want to show parent-categories
       while ( level < $("form .form-field #parent").find(".level-" +  level).length>0 ) { 
            $("form .form-field #parent").find(".level-1").remove(); //Remove level
       }
    });
    </script>    
<?php
}

(categorycourses is a taxonomy, and if you wish to use the code just change the taxonomy
like

add_action('{taxonomy}_add_form_fields','{taxonomy}_edit_form_fields');
add_action('{taxonomy}_edit_form_fields','{taxonomy}_edit_form_fields');

)