    {% else %}
                    Create Course
                {% endif %}
            </button>
        </div>
    </form>
</div>
<script>
const preSelectedTags = [
    {% for tag in course.tags.all %}"{{ tag.id }}",{% endfor %}
];

new TomSelect("#tags", {
    plugins: ['remove_button'],
    persist: false,
    create: true,
    maxItems: 10,
    placeholder: "Select up to 10 tags",
    hideSelected: true,
    items: preSelectedTags
});
</script>
<script>
    document.getElementById('thumbnail').addEven