Forms: the script asks for the right form's token #27

Merged
jcoffey-dev merged 1 commits from fix/form-token-name into main 2026-10-14 20:09:57 +00:00
Owner

Since the rename to HotDog, forms couldn't be sent. The markup sets data-hotdog-form, but the script still read form.dataset.clForm, so every form asked the endpoint for the token of a form called undefined, showed "This form can't be sent right now", and never sent.

One-line fix in hotdog-forms.js, plus a test that reads the attribute from the rendered form and checks the script uses the same one. The test fails without the fix.

Found while checking the contact-forms pack (#26) against a running endpoint. Every release since 0.1.0 has this bug, so it's worth a patch release on its own.

Since the rename to HotDog, forms couldn't be sent. The markup sets `data-hotdog-form`, but the script still read `form.dataset.clForm`, so every form asked the endpoint for the token of a form called `undefined`, showed "This form can't be sent right now", and never sent. One-line fix in `hotdog-forms.js`, plus a test that reads the attribute from the rendered form and checks the script uses the same one. The test fails without the fix. Found while checking the contact-forms pack (#26) against a running endpoint. Every release since 0.1.0 has this bug, so it's worth a patch release on its own.
jcoffey-dev added 1 commit 2026-10-14 20:01:09 +00:00
Forms: the script asks for the right form's token
ci / editor-ui (pull_request) Successful in 1m12s
ci / go (pull_request) Successful in 1m12s
fdeb44177f
The rename to HotDog changed the form's attribute to data-hotdog-form but
left the script reading dataset.clForm, so every form asked the endpoint for
the token of a form called "undefined", showed "This form can't be sent
right now" and couldn't be sent. A test now ties the script to the
attribute the markup sets.
jcoffey-dev merged commit cca8ee8d74 into main 2026-10-14 20:09:57 +00:00
jcoffey-dev deleted branch fix/form-token-name 2026-10-14 20:09:57 +00:00
Sign in to join this conversation.