jquery.repeater
jquery.repeater copied to clipboard
SetList CheckBox value
There is an issue with setting CheckBox values from JSON array
myJson = '{"group-a":[{"text-input1":"1","text-input2":"27","checkBox":["on"]}]}';
All values to input get set normaly. CheckBox stays unsetted.
Regards
I am having the same issue. @matejkr did you found the way out?
Same issue. Was this resolved? Work around? @matejkr @daywong1119 did you guys figure out a work around or the solution?
Thanks/Alain
Hi, I had the same problem but solved it by setting an explicit "value" attribute on the checkbox, eg:
<input type="checkbox" name="checkBox" value="on">
Anyone solved this?
Please, did anyone get to solve this error? Thanks
@paulayo93 I've solved this issue in my situation,
<div ....>
<input type="checkbox" name="payment[]" value="bank" >
<input type="checkbox" name="payment[]" value="cash" >
<input type="checkbox" name="payment[]" value="credit">
</div...>
$repeater.setList([
{
"payment" = ["bank", "cash"],
....
},
)]
So after that my checkbox with value "bank" and "cash" wil be checked.