I made a new node type that can be created by anonymous users. I want to force them to check a checkbox that says they agree to the "terms of use" before they can submit the form and create the node. I made an integer checkbox, and put the values "0" and "1", and checked the "required" checkbox. But that doesn't seem to make it do what I want.
Does anyone have any ideas on how to do this?
Comments
Comment #1
moshe weitzman commentedThat sounds like a bug.
Comment #2
marcoBauli commentedthis is happening here and to igorik too.
setting a required text field to any widget other than 'Text Field' fails to be effectively required on node submission / edit.
anyone else?
Comment #3
marcoBauli commentedbumping this
is any one else experiencing the bug described?
i still notice the same bug with latest 5.x version.
This might be related to some bug in core, as the Checkbox validate module tries to fix, and which can be an interim solution for CCK checkboxes, but not 'select lists'.
Comment #4
joachim commented+1 and confirming with 5.x-1.10
I have just installed Checkbox validate module, and it does not help in this case because the #required attribute for the checkbox is present but empty -- so Checkbox validate ignores it.
Ie, I have this in $form:
Comment #5
threexk commentedI cannot replicate this problem in 5.x-1.10 for node add. I created a new content type, gave it a required checkboxes field, and attempted form submission without checking anything. It correctly reported that the field was required. I also tested the case that the checkboxes allow multiple values; again it correctly reported the field was required.
joachim: Could you give the specifics of what you are doing to see this problem with checkboxes in 5.x-1.10?
Comment #6
karens commentedThe D5 version is no longer being supported. Sorry.