     html = task.choiceTemplate choice, i
     fieldset.insertAdjacentHTML 'beforeend', html
     
+    @defaults.details.push
+      name: choice.key
+      value: choice.value
+    
     choice
 
 DecisionTree.registerTask DetailsTask


  reset: (value) ->
    console.log 'reset' unless value?
    value ?=
      details: [{name: 'type', value: 'drawing/painting/diagram'}, {name: 'keywords', value: ''}]
    
    @form.find("[name=#{o.name}]").val(o.value) for o in value.details
    @value = value

    select: require './select'
    text: require './text'
    textarea: require './textarea'
  
  defaults:
    details: []
  
  template: -> """
    <div class='decision-tree-question'>#{@question}</div>
