I've created a select dropdown list of terms from a CPT taxonomy. This works fine. Here is my code
<label for="films">Films</label>
<select name="films" id="films">
<option value="" disabled selected>Films</option>
<?php
$taxonomy = 'films';
$terms = get_terms($taxonomy); // Get all terms of a taxonomy
if ( $terms && !is_wp_error( $terms ) ) : ?>
<?php foreach ( $terms as $term ) { ?>
<option value="<?php echo get_term_link($term->slug, $taxonomy); ?>"><?php echo $term->name; ?></option>
<?php } ?>
<?php endif;?>
</select>
What I'd like to do is when you select a term from the dropdown, it then jumps to the term archive page automatically. Similar to the native WP category dropdown widget.