give the input element a value of "on" ?
Aug 18, 2022
5
Level 4
Checkbox input field returning a string?
Hi, in my register form I have a checkbox input to accept my terms which the controller should show only as 'on' if its selected. However, its accepting string values for some strange reason. Can anyone offer any insight into this and tell me what could be wrong? The code to the checkbox is below. Thanks
<div class="mb-5">
<div class="custom-control custom-checkbox d-flex align-items-center text-muted">
<input type="checkbox" class="custom-control-input" id="termsCheckbox" name="termsCheckbox" data-msg="Please accept our Terms and Conditions.">
<label class="custom-control-label" for="termsCheckbox">
<small>
I agree to the
<a class="link-underline" href="../pages/terms.html">Terms and Conditions</a>
</small>
</label>
</div>
<div class="checkboxerror">
</div>
</div>
Please or to participate in this conversation.