Practical example for converting Form data to JSON object?

This issue has been tracked since 2022-07-26.

I've searched quite a bit, but I can't seem to find a practical example for converting form data to JSON:

Docs: https://hyperscript.org/docs/#conversions

Values - converts a Form (or other element) into a struct containing its input names/values

I've been playing around with this, but I can't get it to work and now it feels like I'm just guessing. 😅

<div _="on click get the (value of #rightCol) as Values and put it into #resp">click me</div>

In the above code

  • #rightCol is the id assigned to a <form> tag.
  • #resp is just a blank <div id="resp"></div>

I started with this, which works, and was trying to building off of it:
<div _="on click put 'hello' into #resp">click me</div>

More Details About Repo
Owner Name bigskysoftware
Repo Name _hyperscript
Full Name bigskysoftware/_hyperscript
Language JavaScript
Created Date 2020-05-27
Updated Date 2022-11-25
Star Count 1265
Watcher Count 18
Fork Count 75
Issue Count 86

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date