Topic: Checkbox not working
blackcurrantapps pro asked 6 years ago
<input type="checkbox" value="{{ $option }}" id="{{ $option->other_option_id }}"> <label for="{{ $option->other_option_id }}" class="label-table"></label>This doesn't work but when I append any string to it like "_check" it works.
<input type="checkbox" value="{{ $option }}" id="{{ $option->other_option_id }}_check"> <label for="{{ $option->other_option_id }}_check" class="label-table"></label>The second piece of code is able to manipulate checkbox state. I am not able to understand why the first piece of code doesn't work.
jordansgr free answered 4 years ago
For my.
That works.https://prnt.sc/s06o51
That doesn't https://prnt.sc/s06oaa
Grzegorz Bujański staff commented 4 years ago
Hi. Input should be sibling with label - not children. Look at example here: https://mdbootstrap.com/docs/jquery/forms/checkbox/
Mikołaj Smoleński staff answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No