By radu_d on
I want to add a boolean field to a custom type node. I added a field of type integer and I selected widget single on/off checkbox. The problem is that in the DB the field is always not set. Do you have any idea for adding a boolean field?
Comments
This might be the way to do it...
I think this is how you create a boolean field:
1) Create an integer CCK field
2) Choose "Single on/off checkbox" as widget
3) In the "Allowed values list" add the following:
You can replace
label_offandlabel_onwith whatever you like, but keep the0and1.I was searching for some good instructions on how to make boolean fields and couldn't find any. It wasn't until I found this issue about a better UI for adding boolean fields I realize the part about key|label.