DubFriend / jquery.repeater

Create a repeatable group of input elements
MIT License
390 stars 192 forks source link

How to create an input with the file type? #133

Open panchenkoprog opened 4 years ago

panchenkoprog commented 4 years ago

How to create an input with the file type? When i click on add button the error appears http://prntscr.com/tr64kk I do it like this:

$ (document) .ready (function () {
         'use strict';
         $ ('. repeater'). repeater ({
             defaultValues: {
                 'textarea-input': 'foo',
                 'file-input': 'file'
             },
             show: function () {
                 $ (this) .slideDown ();
             },
             hide: function (deleteElement) {
                 if (confirm ('Are you sure you want to delete this element?')) {
                     $ (this) .slideUp (deleteElement);
                 }
             }
         });
   });

My default data.