How do I get the value of the checkbox (or state, checked or not 1-0) so that I can pass it to a controller?, I’ve tried the following but it doesnt work.
<input class="form-check-input" id="wealth" onclick="document.controller.setValue('/ctx/vars/services',getValue(this));" type="checkbox" value="" />
Uncaught ReferenceError: getValue is not defined at HTMLInputElement.onclick
Advertisement
Answer
change getValue(this)
to this.checked
.
it will get checkbox current state.