Form Data Json - Form input values to/from JSON (And a bit more...)

Form input values to/from JSON (And a bit more...)




Getting started - basic example

Form

Code

FormDataJson.toJson("#basic")

Result (Live when form is changed)

{
  "firstName": "Jane",
  "lastName": "Doe",
  "email": "janedoe@jandoe.org",
  "password": "hiddensecret",
  "answer": {
    "1": "You've asked me once"
  },
  "deep": {
    "deeper": {
      "deepest": {
        "6": "As deep as you want"
      }
    }
  },
  "age": "33",
  "reasons": [
    "google",
    "duno"
  ],
  "satisfied": "2",
  "color": "#559922",
  "result": "1"
}

Auto Increment indexes with []

Form

Code

FormDataJson.toJson("#ai")

Result (Live when form is changed)

[]