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

https://github.com/milankyncl/plain-js-form-replicator

jQuery Form Replicator converted to PlainJS version.
https://github.com/milankyncl/plain-js-form-replicator

Last synced: about 2 months ago
JSON representation

jQuery Form Replicator converted to PlainJS version.

Awesome Lists containing this project

README

        

# PlainJS Form replicator #

**jQuery plugin converted to PlainJS version**

PlainJS Form replicator plugin for easy form control with possibility to duplicate form groups.

## Configuration options ##

**firstItemUndeletable**

Set if first item is deletable or not.

```javascript
default: true
options: boolean (true | false)
```

**onHide**

Callback executed after clicking ```[data-group-remove-item]``` element.

```javascript
default: function(){ this.style.display = 'none' }
options: function(item){ // your code here }
arguments:
item: HTMLElement of item to be hidden
```

**onShow**

Callback executed after clicking ```[data-group-add-item]``` element.

```javascript
default: function(){ this.style.display = 'block' }
options: function(item){ // your code here }
arguments:
item: HTMLElement of item to be showed
```