       partial  : pricePartial
 
     @form = @initForm()
+
+    @observeForm()
 
     @existingCreditCardMessage = new KDCustomHTMLView
       cssClass : 'existing-cc-msg'

      cardNumber.setClass type.toLowerCase()

    @paypalForm.on 'PaypalTokenLoaded', @bound 'initPaypalClient'


  showValidationErrorsOnInputs: (error) ->


    @state = KD.utils.extend @getInitialState(), state

    @isInputValidMap = {}

    @initViews()
    @initEvents()


  observeForm: ->

    isVisible = (key) => @form.inputs[key]?.getOption('cssClass') isnt 'hidden'

    Object.keys(@form.inputs).filter(isVisible).map (name) =>

      input = @form.inputs[name]

      @isInputValidMap[name] = no

      input.on 'ValidationResult', (isValid) =>

        @handleFormInputValidation name, isValid


  handleFormInputValidation: (name, isValid) ->

    @isInputValidMap[name] = isValid

    formIsValid = yes
    formIsValid = formIsValid and value  for own key, value of @isInputValidMap

    @emit 'GotValidationResult', formIsValid


  initViews: ->
