Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/palkan/formerjs

JS (vanilla) lib to handle html form data as object
https://github.com/palkan/formerjs

Last synced: 2 days ago
JSON representation

JS (vanilla) lib to handle html form data as object

Awesome Lists containing this project

README

        

# Former js
Simple lib to manipulate form data (read and write)

## Deps
None

## Dev Deps
NodeJS+Bower+Brunch

## Features
* Parse form data as object
Example:
```




Sports
Politics


```
In your JS:
```
data = FormJS.parse(document.getElementById('post_form'));

data = {
post:{
name: 'Name',
is_private: 'true',
category: 'Sports',
tags:[
'football',
'uefa'
]
}
}

```
* Fill form data from object
* Use name transformers (e.g. Rails name parsers) and value parsers or build your own.
Example:
```




Sports
Politics


```