Django and HTMX #14 - Trigger Filters for Conditionally Triggering Requests
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.
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
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:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog:
👾 Github:
🐦 Twitter:
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Trigger Filters: #trigger-filters
#django #htmx #python
2 views
10
1
10 years ago 00:04:19 257
Django Django - Shake and Tremble
4 years ago 02:45:27 45
E-commerce Website With Django and Vue Tutorial (Django Rest Framework)
5 years ago 00:27:49 7
Best IDE for Django and Python
4 years ago 02:18:50 12
Python Django and Google APIs - Project Tutorial
11 years ago 00:00:43 18
Django ’Django and Broomhilda’
11 years ago 00:04:49 148
Django Django - “WOR“ (Official Video)
9 years ago 00:02:35 501
Devinci Django
5 years ago 00:02:54 2
Django and Jimmie
6 years ago 00:43:10 20
Python Django Tutorial 2018 for Beginners Part 2 - How to Create Models and Use Django Admin
9 years ago 00:03:22 17
Try Django Tutorial 6 of 21 - Django Models and Model Form
9 years ago 00:04:19 24
Django Django - Shake and Tremble (Live on 89.3 The Current)