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

    busy-tomato-43957

    11/12/2022, 6:36 PM
    @shy-zebra-22292 yep it works! I changed it everywhere to
    <input id="new-todo" name="new-todo" placeholder="What needs to be done?" autofocus hx-post="/todos;add" hx-target=".todo-list" hx-swap="afterbegin" hx-swap-oob="true" />
    Note the docs say: > Out of band elements must be in the top level of the response, and not children of the top level elements. So it's safe to always include hx-swap-oob in the original fragment (as long as its wrapped in a parent element)
  • s

    shy-zebra-22292

    11/12/2022, 6:38 PM
    Yaay! Congrats 😄
  • b

    busy-tomato-43957

    11/12/2022, 6:59 PM
    hm, some complications: it seems my 'safe to always include -oob attribute' comment isn't quite right
  • b

    busy-tomato-43957

    11/12/2022, 7:01 PM
    for some reason if the -oob attribute is present on a tag inside a larger fragment then it just isn't rendered at all
  • b

    busy-tomato-43957

    11/12/2022, 7:03 PM
    I would prefer that the -oob attribute is just ignored if its included on a tag that's not at the top level of a response
  • r

    refined-garage-59106

    11/12/2022, 7:21 PM
    Does putting an array of inputs not go through PHP? as in;
    Copy code
    <input name="example[]" value="X">
    <input name="example[]" value="Y">
    <input name="example[]" value="Z">
    Just doesn't go through and is seen as example..
  • s

    shy-zebra-22292

    11/12/2022, 8:19 PM
    try print_r($_POST); to see what you are receiving in php... if you wish to send all the inputs at once I imagine you should put them in a and send the whole form instead.
  • s

    shy-zebra-22292

    11/12/2022, 8:25 PM
    makes perfect sense. The quote you posted above states that it will only work on top level elements... or did I get you wrong?
  • m

    mysterious-toddler-20573

    11/12/2022, 11:20 PM
    https://mobile.twitter.com/htmx_org/status/1591571219039801344
  • m

    miniature-lizard-24702

    11/13/2022, 12:00 AM
    🤮
  • m

    miniature-lizard-24702

    11/13/2022, 12:04 AM
    the comment section scares me
  • m

    mysterious-toddler-20573

    11/13/2022, 12:04 AM
    it will get worse before it gets better
  • m

    miniature-lizard-24702

    11/13/2022, 12:04 AM
    I feel genuine feer
  • m

    mysterious-toddler-20573

    11/13/2022, 12:04 AM
    it's fine
  • m

    miniature-lizard-24702

    11/13/2022, 12:04 AM
    it's like they drank the wrong water
  • m

    miniature-lizard-24702

    11/13/2022, 12:05 AM
    I don't use react nor have I ever but when I look at react and npm I want no part
  • m

    miniature-lizard-24702

    11/13/2022, 12:05 AM
    is that weird?
  • w

    white-london-59674

    11/13/2022, 12:06 AM
    Can anybody recommend a grug simple way of building a twitter-like application, in which users can generate and add audio snippets to a social media feed? I'm mainly wondering about — 1) grug ways to store user-generated audio snippets, and 2) grug ways to display user-generated audio snippets in a feed
  • m

    miniature-lizard-24702

    11/13/2022, 12:07 AM
    did you look at the htmx examples?
  • m

    miniature-lizard-24702

    11/13/2022, 12:08 AM
    imo all the pieces are there
  • m

    miniature-lizard-24702

    11/13/2022, 12:10 AM
    there and the other docs since it doesn't have a Websocket/SSE example
  • w

    white-london-59674

    11/13/2022, 12:10 AM
    Thanks so much @miniature-lizard-24702 . If there is any example that particularly points to working with audio, a reference would be awesome. I'll dig in as well.
  • m

    miniature-lizard-24702

    11/13/2022, 12:10 AM
    I think you can trigger a request for content every few seconds or so with the hx-trigger? Maybe
  • m

    miniature-lizard-24702

    11/13/2022, 12:11 AM
    audio in what way
  • m

    miniature-lizard-24702

    11/13/2022, 12:12 AM
    yea you can poll an endpoint if you want. no need for websocket/sse if you dont want to
  • m

    miniature-lizard-24702

    11/13/2022, 12:12 AM
    https://htmx.org/docs/#polling
  • w

    white-london-59674

    11/13/2022, 12:12 AM
    While I've built some fullstack things (particularly in SvelteKit) that store text in Postgres databases, I've never done something like that with audio files before. I was curious if there are any simpler ways to do that, then what might come up from the top of google searches.
  • m

    miniature-lizard-24702

    11/13/2022, 12:15 AM
    you could just use regular js for this one thing, or some other library, like alpine, stimulus, or svelte
  • m

    miniature-lizard-24702

    11/13/2022, 12:15 AM
    can svelte generate a web component?
  • m

    miniature-lizard-24702

    11/13/2022, 12:16 AM
    I know it compiles down so it shouldnt be too heavy to use for a wc right?
1...903904905...1146Latest