DubFriend / jquery.repeater

Create a repeatable group of input elements
MIT License
389 stars 191 forks source link

Issue with checkboxes #121

Open lk77 opened 4 years ago

lk77 commented 4 years ago

Hello,

i have an issue with checkboxes, the generated name is not correct, it has a [] at the end of it :

https://github.com/DubFriend/jquery.repeater/blob/1c3ba62b6a6801f0555cd58ba23706a6b65a4c1e/src/repeater.js#L162

but a checkbox is not multiple.

thanks.

ayushsoni1001 commented 3 years ago

Hello,

i have an issue with checkboxes, the generated name is not correct, it has a [] at the end of it :

https://github.com/DubFriend/jquery.repeater/blob/1c3ba62b6a6801f0555cd58ba23706a6b65a4c1e/src/repeater.js#L162

but a checkbox is not multiple.

thanks.

Removing [] from this line works

Thanks for pointing out

Evrajody commented 2 years ago

Thanks Bro! You don't need to remove [] from the line The real condition is ($input.is(':checkbox') && $input.attr('multiple') ? '[]' : '');