Problem:
How can I use a Checkbox in a HTML conditional?
Solution:
To check the status (value) of a Single Checkbox, please use the GUI "Conditional Display" (a button you find wverywhere in the Editors when Views is active)
Then choose Types Fields as source, and check the Field you need (checkbox)
Set your condition and click insert.
I paste below a sample code.
==> Note, my Checkbox is named "Checkbox-Single" and stores "1" if checked, nothing if not checked.
[wpv-conditional if="( $(wpcf-checkbox-single) eq '1' )"]
//things in here are displayed only if Checkbox Is checked (1)
[/wpv-conditional]
If you need to evaluate this CheckBox while on a Child Post, so you need to check if the PARENT has that checkbox checked, you simply add
id="$parent_post_type_slug_here
to the ShortCode, and use Views Shortcodes instead of types ShortCodes, as in this example:
[wpv-conditional if="( '[types field='checkbox-single' id='$parent-type'][/types]' eq '1' )"]
//Things in here display only if the PARENT checkbox is checked (1)
[/wpv-conditional]
Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/