   @params: (form) ->
     param = {}
 
-    # create jquery object if not already exists
-    if form instanceof jQuery
-      # do nothing
-    else
-      form = $(form)
-
-    # find form if current is <form>
-    if form.is('form')
-      form = form
-
-    # find form based on sub elements
-    else if form.find('form')[0]
-      form = $( form.find('form')[0] )
-
-    # find form based on parents next <form>
-    else if form.parents('form')[0]
-      form = $( form.parents('form')[0] )
-
-    # use current content as form if form isn't already finished
-    else if !@finishForm
-      from = form
-    else
-      App.Log.error 'ControllerForm', 'no form found!', form
+    lookupForm = @findForm(form)
 
     # get form elements
-    array = form.serializeArray()
+    array = lookupForm.serializeArray()
 
     # 1:1 and boolean params
     for key in array
 
       # check if item is-hidden and should not be used
-      if form.find('[name="' + key.name + '"]').hasClass('is-hidden')
+      if lookupForm.find('[name="' + key.name + '"]').hasClass('is-hidden')
         continue
 
       # collect all other params

    formId = new Date().getTime() + Math.floor( Math.random() * 99999 )
    formId.toString().substr formId.toString().length-9, 9

  @disable: (form) ->
    App.Log.notice 'ControllerForm', 'disable...', $(form.target).parent()
    $(form.target).parent().find('button').attr('disabled', true)
    $(form.target).parent().find('[type="submit"]').attr('disabled', true)
    $(form.target).parent().find('[type="reset"]').attr('disabled', true)


  @enable: (form) ->
    App.Log.notice 'ControllerForm', 'enable...', $(form.target).parent()
    $(form.target).parent().find('button').attr('disabled', false)
    $(form.target).parent().find('[type="submit"]').attr('disabled', false)
    $(form.target).parent().find('[type="reset"]').attr('disabled', false)

  @validate: (data) ->

    # remove all errors
    $(data.form).parents().find('.has-error').removeClass('has-error')
    $(data.form).parents().find('.help-inline').html('')

    # show new errors
    for key, msg of data.errors
      $(data.form).parents('form').find('[name="' + key + '"]').parents('div .form-group').addClass('has-error')
      $(data.form).parents('form').find('[name="' + key + '"]').parent().find('.help-inline').html(msg)

    # set autofocus
    $(data.form).parents('form').find('.has-error').find('input, textarea').first().focus()

    App.Log.debug 'ControllerForm', 'formGen', @model.configure_attributes

    fieldset = $('<fieldset></fieldset>')

    fieldset.append('<a href="#" class="js-reset hide">' + App.i18n.translatePlain('Discard your unsaved changes.') + '</a>')

    # collect form attributes
    @attributes = []
