1

On a Visualforce Page, apex:inputCheckbox isn't checked even though its value is true.

enter image description here

On both the Page and the Code, the apex:inputCheckbox is highlighted in red, and the value of the input is highlighted in blue. Why are't the Checkboxes checked? What could I be doing wrong?

I verified there is no JavaScript acting on the Checkboxes.

Upon inspection, the HTML says the input's checked="checked", but after adding onmouseover="console.log('checked: ' + $(this).is(':checked'));" to the apex:inputCheckbox, and the Console's log says

checked: false

The Checkbox is definitely not checked. And when I save the records without re-checking the Checkbox, the controller reads isSelected as false.

1

I took off the styleClass on the apex:inputCheckbox, and they checked.

I'm using a VF Template, and the Parent had JavaScript that was unchecking the Checkboxes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.