Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

htmx: JSON form extension

This htmx extension provides a more convenient way to send complex JSON via forms.

It provides a convenient syntax to create nested objects, without ever having to manually add array indices.

Examples

Simple nested object

<inputname="title"><inputname="author.name"><!-- Nesting with dots --><inputname="author[bio]"><!-- Nesting with brackets -->

Arrays

<inputname="url"><inputname="url"><inputname="url"><!-- Simply repeat a property --><inputname="title[]"><inputname="title[]"><inputname="title[]"><!-- Array indicator -->

Array of objects

<inputname="articles[][title]"><inputname="articles[][category][]"><inputname="articles[][category][]"><!-- nested objects and arrays --><inputname="articles[+][title]"><!-- Plus marks the start of a new object --><inputname="articles[][category][]">

About

A versatile way to send JSON via forms

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages