Skip to content

Commit

Permalink
updates for upcoming stable release
Browse files Browse the repository at this point in the history
  • Loading branch information
brainfoolong committed Sep 30, 2021
1 parent 275935b commit 1ff4170
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,19 @@ let values = FormDataJson.toJson(document.querySelector("form"), {includeDisable
```
###### Read with file inputs as base64 data uri
```javascript
FormDataJson.toJson(document.querySelector("form"), {filesCallback: function(values){}})
FormDataJson.toJson(document.querySelector("form"), {
filesCallback: function (values){
console.log(values)
}
})
```
###### Read form input values but filter out, for example, all password fields
```javascript
let values = FormDataJson.toJson(document.querySelector("form"), { inputFilter: function(inputElement) { return (inputElement.type || 'text') !== 'password' } })
let values = FormDataJson.toJson(document.querySelector("form"), {
inputFilter: function (inputElement) {
return (inputElement.type || 'text') !== 'password'
}
})
```

### Write data
Expand Down

0 comments on commit 1ff4170

Please sign in to comment.