Skip to content

handle custom element manual input value collection#3872

Open
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:collect-custom-elt
Open

handle custom element manual input value collection#3872
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:collect-custom-elt

Conversation

@MichaelWest22

@MichaelWest22 MichaelWest22 commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix: FACE value not sent when used as standalone trigger (no form)

Form-associated custom elements (e.g. ) used as standalone htmx triggers outside a

stopped sending their value in beta4. This was a regression introduced by f02a86b ("Improve Non form input and checkbox handling").

The fix adds a single else if branch in __addInputValues for elements whose tag name contains a hyphen (the W3C-mandated marker for all custom elements). These are routed through the existing loop the same way BUTTON is — inputs = [elt] — so they pick up the name/disabled/included guards and fall through to formData.append(input.name, input.value) without any duplicated logic.

The form path (new FormData(form)) is unaffected and continues to collect FACE values via setFormValue as before.

Corresponding issue:
#3871

Testing

Added tests for the new behaviour

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded
@MichaelWest22 MichaelWest22 added the htmx 4 Issues specific to htmx version 4 label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

htmx 4 Issues specific to htmx version 4

1 participant