signalpoint / jDrupal

A JavaScript Library and API for Drupal Applications
http://jdrupal.tylerfrankenstein.com/
GNU General Public License v2.0
76 stars 38 forks source link

Updating boolean to false? #67

Closed brianpnz closed 7 years ago

brianpnz commented 7 years ago

I'm using Drupal 7.53 and jDrupal 7.0.5. I can do CRUD operations on all node fields ( title, body, integer), but I can't set a boolean to false. Setting it to true is fine though.

I'm updating the field with: field_my_bool: {und:[{value:0}]}

but when I check the json file received by Drupal it keeps showing the value as '1' and the field doesn't get updated: "field_my_bool":{"und":[{"value":"1"}]}

Does anyone see this issue or have a way of getting round it?

brianpnz commented 7 years ago

Found an answer. I was reading some more google posts and see that to set a True flag use:

field_my_bool: {und:[{value:1}]}

and to set it as False use:

field_projector: { und: null }