docs: improve hx-vals documentation for use with hx-post #3619
+30
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Improve the
hx-valsdocumentation to address common user confusion, especially regarding its use withhx-postand other non-GET HTTP methods.Changes made:
Added "Using hx-vals with hx-post" section
hx-valswithhx-posthx-valsworks with all HTTP methods (POST, PUT, PATCH, DELETE)Added "JSON Syntax Requirements" section
{'key': 'value'}) which silently failsThese additions address user feedback in issue #1134, where multiple users reported spending significant time debugging issues that could have been avoided with clearer documentation.
Corresponding issue: #1134
Testing
This is a documentation-only change. No functional code was modified.
Checklist
masterfor website changes,devfor source changes)npm run test) and verified that it succeeded