https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • t

    tall-dinner-62086

    08/01/2022, 2:41 PM
    Yeah it's gonna have to be query parameters. For my use case cache and link sharing are non-issues
  • t

    tall-dinner-62086

    08/01/2022, 2:41 PM
    But it does have to work
  • t

    tall-dinner-62086

    08/01/2022, 2:42 PM
    It's a backoffice report, a grand total of 2 people are ever going to even see the page
  • r

    ripe-action-67367

    08/01/2022, 2:43 PM
    Fair enough
  • l

    late-king-98305

    08/01/2022, 8:10 PM
    and.... I don't even need to do that; I can just look at the
    HX-Target
    request header... 🤦‍♂️
  • l

    late-king-98305

    08/01/2022, 8:11 PM
    When am I going to learn - if it seems complex, I'm probably doing it wrong.
  • l

    late-king-98305

    08/01/2022, 8:11 PM
    "If it feels complex, it ain't htmx!" <- new slogan
  • l

    late-king-98305

    08/01/2022, 8:12 PM
    (and yes, I realize the immense amount of complexity that went into making it easy for us end users - y'all rock)
  • s

    steep-lamp-42308

    08/01/2022, 10:32 PM
    @brainy-ice-92385 , i can confirm that the cursor is preserved when a unique id is used on each field
  • m

    mysterious-toddler-20573

    08/01/2022, 11:01 PM
    it's an htmx miracle
  • a

    aloof-crayon-56651

    08/02/2022, 2:11 AM
    I have a contact form that isn't working, but it isn't sending me to the debug page (Django).
  • a

    aloof-crayon-56651

    08/02/2022, 2:12 AM
    Using htmx.logAll() in console, I see the serverResponse has the debug page. How do I redirect to it when I get an error?
  • m

    mysterious-toddler-20573

    08/02/2022, 2:29 AM
    I would ask in the #864934037381971988 channel
  • a

    aloof-crayon-56651

    08/02/2022, 2:29 AM
    Okay, thanks.
  • e

    early-hydrogen-75056

    08/02/2022, 4:04 PM
    Hi! Is there a way to add the
    hx-push-url
    attribute for each value of a dropdown (select) with htmx?
  • m

    mysterious-toddler-20573

    08/02/2022, 4:27 PM
    The best pattern I have managed to come up with here is to catch the change event on a select and re-route it to the selected option: https://codepen.io/1cg/pen/NWygaQw?editors=1010
  • e

    early-hydrogen-75056

    08/02/2022, 4:38 PM
    Thanks @mysterious-toddler-20573, I ended up doing it in vanilla JS with
    history.pushState()
    .
  • m

    mysterious-toddler-20573

    08/02/2022, 10:50 PM
    in case anyone is looking for htmx/python work: https://discord.com/channels/725789699527933952/931554608537550959/1004152068757536839
  • b

    brave-dog-98297

    08/03/2022, 2:59 AM
    Is there anything special required to make hx-include work? I want to include a checkbox in a search field which uses hx-post
  • m

    mysterious-toddler-20573

    08/03/2022, 3:02 AM
    nope, just hx-include the checkbox by a CSS selector
  • b

    brave-dog-98297

    08/03/2022, 3:07 AM
    I used hx-include="[name='codcheck']" as per the example and only the search field is included in POST
  • b

    brave-dog-98297

    08/03/2022, 3:07 AM
    Do they need to be in the same div?
  • m

    mysterious-toddler-20573

    08/03/2022, 3:08 AM
    with checkboxes, the value is only included if the checkbox is actually checked, this is how forms work normally and sometimes trips people up.. No, doesn't need to be anywhere near the element making the request. Can you verify the CSS selector is working in the console?
  • b

    brave-dog-98297

    08/03/2022, 3:24 AM
    not getting anything with $$("codcheck")
  • b

    brave-dog-98297

    08/03/2022, 3:35 AM
    CSS validated and POST included with hx-include="#codCheckBox"
  • t

    tall-dinner-62086

    08/03/2022, 10:16 AM
    How do I disable scrolling to swapped content?
  • c

    calm-ice-23682

    08/03/2022, 10:40 AM
    without checking docs I'd guess either ``show:false`` ``scroll:false`` or ``show:none`` , ``scroll:none``
  • c

    clean-vegetable-65167

    08/03/2022, 11:34 AM
    Hi @mysterious-toddler-20573 is it possible to do build of htmx with just the used features? I mean I love what you are doing here and many of the new features are very useful but it gradually grows which can weigh down the web.dev performance metric.
  • m

    mysterious-toddler-20573

    08/03/2022, 12:31 PM
    https://bundlephobia.com/package/htmx.org@1.8.0
  • m

    mysterious-toddler-20573

    08/03/2022, 12:31 PM
    15ms on emerging 4g and cached after the first request
1...767768769...1146Latest