Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some external links (#3157) #3160

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Conversation

xehrad
Copy link
Contributor

@xehrad xehrad commented Jan 30, 2025

I agree. I had tried to arrange the list in alphabetical order.

json-enc converts an HTML form into a simple {input.name: input.value} map, whereas form-json allows input.name values containing . to be interpreted as paths for nested structures.
It also supports <input type="file">, converting file inputs to Base64-encoded data.

json-enc

<form hx-ext="json-enc">
  <input name="user.age" value="18" type=number" />
  <input type="file" name="document">
</form>

<!-- Submission:
{
  "user.age":  "18"
}
-->

form-json

<form hx-ext="form-json">
  <input name="user.age" value="18" type=number" />
  <input type="file" name="document">
</form>

<!-- Submission:
{
  "user":  {
    "age":  18
  },
  "document": {
    "type": "application/pdf",
    "name": "file.pdf",
    "body": "SSBtdXN0IG5vdCBmZWFyLlxuRmVhciBpcyB0aGUgbWluZC1raWxsZXIuCg=="
  }
-->

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

@xehrad xehrad mentioned this pull request Jan 30, 2025
@Telroshan Telroshan added documentation Improvements or additions to documentation extension Consideration for an extension labels Jan 31, 2025
@Telroshan Telroshan merged commit 6ea1029 into bigskysoftware:master Jan 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation extension Consideration for an extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants