Home › Forums › General Issues › True/False required field is asking to be checked › Reply To: True/False required field is asking to be checked
Actually, no, false is not a value. A true false field is actually a checkbox field and a checkbox field only has a value if it is checked. This is because a checkbox field creates an array of checked items and with nothing checked the array is empty.
Setting required on this field only makes sense if you want to refuse submission if it is not checked for something like “I agree with….”
There are only two possible values, true and false, if you will except either then there is no reason to make it required.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.