def resource_form_set_choices(form):
    form.fields['health_topic'].choices = [(t.id, t.name) for t in Tag.objects.filter(
        category__top_level=True).order_by('order_by', 'name')]
    form.fields['resource_type'].choices = [(t.id, t.name) for t in Tag.objects.filter(
        category__slug='type').order_by('order_by', 'name')]
    form.fields['audience'].choices = [(t.id, t.name) for t in Tag.objects.filter(
        category__slug='audience').order_by('order_by', 'name')]
    form.fields['device'].choices = [(t.id, t.name) for t in Tag.objects.filter(
        category__slug='device').order_by('order_by', 'name')]
    form.fields['license'].choices = [(t.id, t.name) for t in Tag.objects.filter(
        category__slug='license').order_by('order_by', 'name')]
    return form