Closed (fixed)
Project:
Services
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2016 at 08:12 UTC
Updated:
29 Mar 2019 at 12:40 UTC
Jump to comment: Most recent
Comments
Comment #2
hby01 commentedComment #3
hby01 commentedComment #4
tyler.frankenstein commentedIf it's a boolean field, the JSON data for the particular field should look like this:
field_mark_as_discounted: { und: [ { value: 1 } ] }Comment #5
Codexr commentedThis doesn't appear to be working. I am trying the following:
field_character_type: {und: [{value: 0}]}
With no luck
I can check a checkbox but I cannot uncheck a checkbox.
Comment #6
tyler.frankenstein commentedIIRC, to uncheck a boolean, you may have to send null. Try some of these:
field_character_type: null
field_character_type: {und: null}
field_character_type: {und: [null]}
field_character_type: {und: [{value: null}]}
Things may also change if your field is required or not, so perhaps try toggling the required bit on the field instance settings to see if that changes how things behave.
Comment #7
jacob.embree commentedMarking fixed because #6 looks correct and haven't heard from hby01.
Comment #9
jerodfritz commentedAfter much trial and error to uncheck the checkbox the only one that works is
field_character_type: {und: null}I would have assumed it to be:
field_character_type: {und: [{value: "0"}]}or
field_character_type: {und: [{value: false}]}If you want to check the checkbox you can pretty much send anything other than {und: null}. For sanity I send this:
field_character_type: {und: [{value: true}]}