# Customizing django modelform select dropdown

**URL:** <https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159>\
**Category:** Getting Started\
**Created:** [October 8, 2026, 3:00pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159 "2026-10-08T15:00:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![momospix-creator](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/momospix-creator/32/33430_2.png) [@momospix-creator](https://forum.djangoproject.com/u/momospix-creator)\
**Post date:** [October 8, 2026, 3:00pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159/1 "2026-10-08T15:00:09Z")

</div>

I am working on a parcel delivery app

here is the model:

 ![Capture d’écran du 2026-10-08 16-47-29](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/b/2/b20aeba2c8cddbe5c81f4974d9601aca198c5be4.png)

 ![Capture d’écran du 2026-10-08 16-51-37](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/2/f/2f962c9e3f52d91048273ef0ab26e3ada65ccaa4.png)

 ![Capture d’écran du 2026-10-08 16-50-26](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/8/f/8f0412e19a5beae9439367b60e688360dd510a75.png)

here is the rendered page

 ![Capture d’écran du 2026-10-08 16-52-23](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/5/0/50e30f17a5dcef4477f2b8ca7fd9ec318da75657.png)

which does not tell a deliveryagent anything about the task at hand.

i will prefer to render this dropdown like this:

 ![Capture d’écran du 2026-10-08 16-53-18](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/c/d/cda3b149faef40ab06933d511c6c752d5baf00f8.png)

Can anyone help please?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 8, 2026, 3:50pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159/2 "2026-10-08T15:50:22Z")

</div>

Welcome @momospix-creator !

Please do not post images of code, templates, or other text information here. Post the actual text of the code within your message.

When posting code or other preformatted text here, enclose that text between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 8, 2026, 3:54pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159/3 "2026-10-08T15:54:24Z")

</div>

Also, instead of (or perhaps in addition to) posting the desired display image, it would be helpful if you identified specifically what fields you want displayed on the page, and explain what you want those elements to do.

---

<div class="post-metadata">

**Author:** ![momospix-creator](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/momospix-creator/32/33430_2.png) [@momospix-creator](https://forum.djangoproject.com/u/momospix-creator)\
**Post date:** [October 8, 2026, 4:12pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159/4 "2026-10-08T16:12:54Z")

</div>

Sorry I’m new here , just getting started actually, will i have to re-post?

---

<div class="post-metadata">

**Author:** ![momospix-creator](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/momospix-creator/32/33430_2.png) [@momospix-creator](https://forum.djangoproject.com/u/momospix-creator)\
**Post date:** [October 8, 2026, 4:18pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159/5 "2026-10-08T16:18:13Z")

</div>

````auto
``` class DeliveryItem(models.Model):
    delivery_item = models.ManyToManyField(Order, related_name='item')
    delivery_agent = UserForeignKey(auto_user_add=True, related_name='delivery_agent', on_delete = models.CASCADE)``

````

````python
```class DeliveryItemForm(ModelForm):
    
        
    class Meta:
        model = DeliveryItem
        fields = [
            'delivery_item',
            #'delivery_agent'
        ]``

````

````auto
```{% block content %}
    
    <div class="mt-32"></div>
    
        {% for item in order_items %}
            <div class=" mx-auto col-span-8 bg-zinc-600 w-2xl border-2 border-gray-700 rounded-2xl m-8 p-4 grid grid-cols-12 ">
                <div class="col-span-4 ">
                    <img class="w-40 h-40 border-2 border-gray-100 rounded-2xl object-cover" src="{{item.image.url}}" alt="">
                </div>
                
                
                   
                
                <div id="item" class="col-span-7">
                    
                    <h1 class="text-xs text-white font-semibold">Order title: <span class="text-sm font-extrabold">{{item.description}}</span></h1>
                    <h1 class="text-xs text-white font-semibold">Order type: <span class="text-sm font-extrabold">{{item.category}}</span></h1>
                    <h1 class="text-xs text-white font-semibold">Order destination: <span class="text-sm font-extrabold">{{item.parcel_destination}}</span></h1>
                    <h1 class="text-xs text-white font-semibold">Your phone: <span class="text-sm font-extrabold">{{item.sender_phone_number}}</span></h1>
                    <h1 class="text-xs text-white font-semibold">Destination phone number: <span class="text-sm font-extrabold">{{item.receiver_phone_number}}</span></h1>
                    <h1 class="text-xs text-white font-semibold">Your Order id: <span class="text-sm font-extrabold">{{item.id|slice:":8"}}</span></h1>
                    <h1 class="text-xs text-white font-semibold">Your Order status: <span class="text-sm font-extrabold">{{item.order_status }}</span></h1>
                    <h1 class="text-xs text-white font-semibold">Your Order will be delivered: <span class="text-sm font-extrabold">{{item.delivery_date }}</span></h1>
                    
                    
                </div>
              
                    <button
                   
                    class=" w-full cursor-pointer bg-zinc-300 border-2 border-gray-500 rounded-lg font-bold text-md p-2 text-white"
                    >
                        <img width="50" height="50" src="https://img.icons8.com/ios/50/hand-cursor.png" alt="hand-cursor"/>
                    </button>  
              
                
                </div>
               
        {% endfor %}

    <div class=" grid items-center justify-center max-w-7xl h-auto mb-7 mx-auto mt-7 bg-gray-300 font-bold text-md shadow-lg shadow-gray-600 rounded-2xl p-6 text-black">
        <form class="min-w-lg" action="." hx-post = "{% url "add_task" %}">
            {% csrf_token %}
            {{task_form|crispy}}
            <div id= "orderitem" class="mt-3"></div>
            <button class=" w-full cursor-pointer bg-zinc-700 border-2 border-gray-500 rounded-lg font-bold text-md p-2 text-white" value="save" type="submit" method="post" >Submit</button>
        </form>
    </div>
</div>
{% endblock content %}``

````

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 8, 2026, 4:22pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159/6 "2026-10-08T16:22:17Z")

</div>

It needs to be posted with three backticks - and don’t escape them.  
Example:

````auto
# The line above this is ```
def function():
    return none
# The line after this is ```

````

Also, make sure there aren’t any extraneous blank lines and that the formatting is correct - it’s best to just copy/paste the code from your code editor into the post.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 8, 2026, 4:24pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159/7 "2026-10-08T16:24:03Z")

</div>

No worries, this post is good enough - we’ll work through the formatting issues.

If you’ve got the pencil icon in the menu below the post (perhaps shown by the  
`...` icon), you can edit an exist message.
