jquery.repeater
jquery.repeater copied to clipboard
Select field issue
<span data-repeater-item="" style=""> <select name="2_5[1][1]" id="1" class="form-control"> <option value="0">Non Continuing</option> <option value="1">Continuing</option> </select> <input type="number" name="2_5[1][2]" id="2" class="form-control" required=""> <input data-repeater-delete="" type="button" value="Delete"> </span>
data-values='[{"1":"0","2":"123"},{"1":"1","2":"156"},{"1":"0","2":"345"}]'
$(document).ready(function () { var repeater_class = '.repeater'; var repeater = $(repeater_class).repeater(); var values = $(repeater_class).data('values'); repeater.setList(values); }); </script>
This is my repeater, wanted to set values. Already tested, values is an object.
Getting this error:
- jQuery.Deferred exception: Cannot read property 'set' of undefined TypeError: Cannot read property 'set' of undefined
at http://www.biw.vm/assets/js/jquery.repeater.min.js:1:6609
at g (http://www.biw.vm/assets/js/jquery.repeater.min.js:1:265)
at yt.fn.init.a.fn.inputVal (http://www.biw.vm/assets/js/jquery.repeater.min.js:1:6587)
at d (http://www.biw.vm/assets/js/jquery.repeater.min.js:1:9383)
at http://www.biw.vm/assets/js/jquery.repeater.min.js:1:9965
at x (http://www.biw.vm/assets/js/jquery.repeater.min.js:1:10035)
at g (http://www.biw.vm/assets/js/jquery.repeater.min.js:1:265)
at yt.fn.init.d [as setList] (http://www.biw.vm/assets/js/jquery.repeater.min.js:1:10105)
at HTMLDocument.<anonymous> (http://www.biw.vm/step/2:67:22)
at u (http://www.biw.vm/assets/js/app.js:29:25135) undefined
- yt.Deferred.exceptionHook @ app.js:29
- c @ app.js:29
- setTimeout (async)
- (anonymous) @ app.js:29
- l @ app.js:29
- fireWith @ app.js:29
- fire @ app.js:29
- l @ app.js:29
- fireWith @ app.js:29
- ready @ app.js:29
- g @ app.js:19
- app.js:29 Uncaught TypeError: Cannot read property 'set' of undefined
at jquery.repeater.min.js:1
at g (jquery.repeater.min.js:1)
at yt.fn.init.a.fn.inputVal (jquery.repeater.min.js:1)
at d (jquery.repeater.min.js:1)
at jquery.repeater.min.js:1
at x (jquery.repeater.min.js:1)
at g (jquery.repeater.min.js:1)
at yt.fn.init.d [as setList] (jquery.repeater.min.js:1)
at HTMLDocument.<anonymous> (2:67)
at u (app.js:29)
I got same issues