
Seems simple enough, check a box. The backstory is I'm using JSON to import spell details from an outside source into a character sheet so spells don't have to be filled out one at a time. All other input is just text inputs or a textarea, and they all work great. The 3 checkboxes listed below don't work. If they're checked and the JSON is added, they become unchecked regardless of their supposed value.
V<input type="checkbox" name="attr_spellVerbal" value="{{v=1}}" /> S<input type="checkbox" name="attr_spellSomatic" value="{{s=1}}" /> M<input type="checkbox" name="attr_spellMaterial" class="spellMaterial" value="{{m=1}}" />
on('change:repeating_spells1:spellJSON', function(){ getAttrs(["repeating_spells1_spellJSON"], function(v){ var obj = JSON.parse(v.repeating_spells1_spellJSON); setAttrs({ repeating_spells1_spellName: obj.name, repeating_spells1_spellSchool: obj.school, repeating_spells1_spellVerbal: obj.verbal, repeating_spells1_spellSomatic: obj.somatic, repeating_spells1_spellMaterial: obj.material, repeating_spells1_spellMat1: obj.materials, repeating_spells1_spellRange: obj.range, repeating_spells1_spellAoe: obj.aoe, repeating_spells1_spellCastingTime: obj.castingTime, repeating_spells1_spellDuration: obj.duration, repeating_spells1_spellSave: obj.save, repeating_spells1_spellDamage: obj.damage, repeating_spells1_spellDescription: obj.description, repeating_spells1_spellJSON: '' }); }); });
And the JSON
{"name":"Extinguish", "school":"Abjuration", "verbal":"1", "somatic":"1", "material":"1", "materials":"A drop of water", "range":"Self", "aoe":"50' radius / level", "castingTime":"1", "duration":"Instantaneous", "save":"None", "damage":"", "description":"With a snap of their fingers and at least a drop of water, the wizard snuffs out all applicables fires within the AOE. At first level, this spell snuffs out all candles, torches, lanterns, small camp fires or other similarly exposed flames. At third level this fire puts out large camp fires and braziers. At fifth level this spell puts out bonfires and small structure fires. At seventh level this spell puts out burning buildings. At ninth level this spell puts out all non magical flames in its area of affect, even a raging forest fire. The reverse of this spell, Ignite, will set aflame any small fire yet to be lit. Candles, torches, lanterns, braziers, or small camp fires that are prepared can be ignited. The reverse has no spell component, and will not work to ignite non prepared substances. The thatch of a roof, a small dry bush, or even a pit of oil cannot be lit via this spell."}
I'm at a loss for this simple task. Any help?