Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetList CheckBox value #73

Open
matejkr opened this issue Oct 16, 2017 · 6 comments
Open

SetList CheckBox value #73

matejkr opened this issue Oct 16, 2017 · 6 comments

Comments

@matejkr
Copy link

matejkr commented Oct 16, 2017

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

@daywong1119
Copy link

I am having the same issue. @matejkr did you found the way out?

@alainjlavoie
Copy link

alainjlavoie commented Feb 12, 2019

Same issue. Was this resolved? Work around? @matejkr @daywong1119 did you guys figure out a work around or the solution?

Thanks/Alain

@pauljura
Copy link

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">

@Virelox
Copy link

Virelox commented Oct 5, 2020

Anyone solved this?

@paulayo93
Copy link

Please, did anyone get to solve this error?
Thanks

@bekanur98
Copy link

bekanur98 commented Mar 29, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants