I have created a field of field type 'List (text)', Widget Type 'Checkbox'. I have added 2 options, number of values are kept as unlimited and by default all of the checkboxes have been saved as checked.

Now, when I create a node, and uncheck all the checkboxes for this field, it automatically gets saved as checked for the first time. I have to edit the node, uncheck the checkboxes and save it again to make it work properly.

Also, there is a bug in the database structure. In the above scenario only, there is no way I can make sure if the checkbox has been unchecked intentionally for the node or it has not been even saved for the node. In both the cases, there is no record in the field_data table.

Comments

Anonymous’s picture

Karan Garg created an issue. See original summary.

Anonymous’s picture

rszrama’s picture

Priority: Critical » Major

Just demoting this as a non-critical bug; not trying to say it isn't important, Karan, but criticals should basically be system-wide showstoppers.

cilefen’s picture

Title: Default Value Issue for List (text) Checkbox » Default Value Issue for List (text) Checkbox is always saved as checked when creating a node, regardless of defaults
Assigned: » Unassigned

In addition, if you assign yourself an issue it signifies you are working on the fix and will actually prevent others from working on it. If that is your intention, go ahead and correct me.

Also, I have a feeling this is a duplicate issue.

Did you create the field in the UI or with code?

Anonymous’s picture

Hi,

@rszrama: Can you please let me know if this issue is being taken care of?

@cilefen: Mistakenly I assigned it to myself.
I was trying to do it with UI.
Can you please let me know the URL for the duplicate issue.

Version: 7.38 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.