Django and HTMX #14 - Trigger Filters for Conditionally Triggering Requests

preview_player
Показать описание
In this video, we'll look into Trigger Filters in HTMX. These are defined with a JavaScript expression in square-brackets after the normal event name used in the hx-trigger attribute, and they allow you to conditionally trigger the request based on conditions.

In this video, we'll demonstrate triggering the username check request ONLY if the username that has been entered into the input element is greater than 3 characters length.

▶️ Full Playlist:

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
02:59 Using HTMX trigger filter
04:17 Trigger filter for checking username length
06:12 Using global JavaScript function as trigger filter

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:

#django #htmx #python
Рекомендации по теме
Комментарии
Автор

Hi mate, you really give us all the ingredients to build dynamic and modern websites. Great content as always. Thank you for everything. 🙇🏾‍♂️🙌🏾

seydinaoumarsamabaly
Автор

Mad respect, this is so much applicable in many Django scenarios.

repotranstech
Автор

hi there, newest subscriber, really cool stuff, please keep up, thanks from the bottom of my heart

amirroohi
Автор

Great series here. Your videos have really helped me so far. 👏

One request please, can you do a video on HTMX with pagination?
Showing CRUD operations also.

coledrain
Автор

This is amazing content, thank you very much❤️
I would love to watch a course for django from you, just to see your perspective on how to learn it
Also it would be great to show us some multiple parameter filtering of tables with htmx

dinel
Автор

Hi, Very informative content, Thank you for this! Small question - How to hide or show subsequent fields in the form, based on the value in the previous choise field, using HTMX? 👍

СергейБекетов-рч
Автор

Thanks for your helpful content. Can yout do a video about Wizard froms?

wesllyeLy
Автор

it seems that using django form widget attribute is sufficient to set custom CSS classes or adding htmx atrrs and using django-widget-tweak is not a really necessary

mahdifirouzjah
Автор

Thanks for your helpful content, can i use HTMX to send json data

manofhat
Автор

W H A T A D O N ⚡ Brilliant insights and vibes throughout!

keenwire