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.
- Host: GitHub
- URL: https://github.com/milankyncl/plain-js-form-replicator
- Owner: milankyncl
- License: mit
- Created: 2019-01-14T12:06:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-14T12:20:12.000Z (over 6 years ago)
- Last Synced: 2025-01-23T06:09:27.378Z (3 months ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```