Hey guys,
Is there any way to get the value of a true / false field in the front end?
I’m talking about a true / false field in an acf_form. So far I haven’t seen any changes is the dom when you click the box, so how can you get the value of the box?
Thanks in advance!
Tim
Never mind, I already found the solution! just check the attribute “checked”. If the box is checked it will return the value “checked”. Otherwise the attribute will be undefined.
So by using this code I check all the boxes within a certain div:
if (jQuery(this).attr("checked")) {
// in here it means that the checkbox is checked
}