Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wellguimaraes/formalize

A form-2-object and object-2-form conversion library
https://github.com/wellguimaraes/formalize

Last synced: 12 days ago
JSON representation

A form-2-object and object-2-form conversion library

Awesome Lists containing this project

README

        

# Formalize.js
A form-to-object and object-to-form conversion library.

#### Fill in a form with an object

```html




Dog
Cat

```

```js
// The object
var obj = {
customer: {
name: "John Doe",
pets: [
{name: "Rex", type: "cat"},
{name: "Fluffy", type: "dog"}
]
}
};

// Fill it in
Formalize.objectToForm(obj, '#my-form');
```

**Formalize** created two hidden fields (for the form missing fields):

```html

```

#### Get and object based on a form

```js
var obj = Formalize.formToObject('#my-form');
```