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
6
1
5 months ago 10:08:02 1
Learn Python Backend Development by Building 3 Projects [Full Course]
5 months ago 00:03:22 1
GYPSY JAZZ - HOT CLUB DU NAX - Joseph Joseph - ジプシージャズ
5 months ago 00:34:30 2
Laravel 11 Release, Context, New Hires, & Open-Source Sustainability
5 months ago 00:40:16 1
GUEST 2 - A Horror Short Film
5 months ago 00:04:15 1
The Man I Love (Gypsy Jazz Guitar)
5 months ago 02:37:26 1
Linux сервер для Django проекта (Nginx, gunicorn, PostgreSQL) + простой CI/CD 🔴 #008 Django СТРИМ
5 months ago 01:27:36 1
Parov Stelar - Live at Sziget 2018 (Full Show)
5 months ago 01:41:58 1
Joscho Stephan Trio - Swinging with Mozart, The Beatles, Ray Charles & something else (Maisach 2024)
5 months ago 00:02:56 1
James Brown, 2Pac - Unchained (The Payback/Untouchable)
5 months ago 00:50:19 4
Joe Bonamassa - You and Me (2006) (full album)
5 months ago 01:07:33 2
BEST sound! Vintage Django Reinhardt Style HC Baltimore w/Duved Dunayevsky & Daniel Garlitsky
5 months ago 00:03:21 1
The Ecstasy of Gold - Ennio Morricone ( The Good, the Bad and the Ugly ) [High Quality Audio]
5 months ago 00:03:13 1
Them There Eyes | Lantern Arts Centre | La Bouche Manouche Feat. Irene Serra
5 months ago 01:29:00 1
Paolo Fresu Quintet SAN JAVIER 2023
5 months ago 01:02:18 1
Billie Holiday - The Best Of Classics Masters - Fantastic Vocal Jazz Music of Our History
5 months ago 00:00:19 1
ALL MY FELLAS.
5 months ago 01:04:17 1
Django AJAX/JQuery tutorial: AJAX Django TODO app with JQuery | Django Tutorial
5 months ago 00:23:08 7
Keynote Speaker Quentin Tarantino at UCLA TFT’s Design Showcase West 6/4/16
5 months ago 00:04:54 1
“Bei Mir Bist Du Schön“– Hot House West Swing Orchestra
5 months ago 00:04:16 1
(western tribute) the chain Fleetwood Mac
6 months ago 00:16:01 1
Alix Combelle - The Chronological Classics: 1935-1940 (1993)
6 months ago 00:03:15 1
Alain Delon - Night Tango (Mad Manoush) with lyrics.
6 months ago 00:14:37 1
Stephane Grappelli - The Chronological Classics: 1935-1940 (1993)
6 months ago 00:03:51 4
Janelle Monáe – Make Me Feel [Official Music Video]