 
   #clear questions
   clearQuestions: (container) ->
-    container.find("input[type!=hidden]").val("")
+    # container.find("input[type!=hidden]").val("")
 
   #evaluate conditional logic rules
   evaluateRules: (operator, answer, value) ->


  # get value of triggering question
  getValue: ($conditionElement) ->
    $conditionElement.val()

$ ->

      $ruleElement = $(this)
      if $ruleElement.attr('data-rule').length > 0
        rule = $.parseJSON($ruleElement.attr("data-rule")).rule
        $(rule.conditions).each ->
          condition = this
          questionId = condition.question_id
          $triggerContainer = $("[data-question-id=" + questionId + "]")
          $triggerElement = $triggerContainer.find(".form-control")
          # text, textarea, select
          if $triggerElement.length < 2
            self.setDefaultState(rule.question_id, $triggerElement, condition.operator, condition.answer)
            self.bindConditions(rule.question_id, $triggerElement, condition.operator, condition.answer)
          # radio buttons
          else
            for element in $triggerElement
              do (element) ->
                self.setDefaultState(rule.question_id, $(element), condition.operator, condition.answer)
                self.bindConditions(rule.question_id, $(element), condition.operator, condition.answer)

    return

  # set the default hide show conditions
