     {createButton} = form.buttons
     @clearSuggestions()
 
-    {DomainOption, domainName, regYears} = form.inputs
+    {DomainOption, domainName, regYears, domains} = form.inputs
     splittedDomain    = domainName.getValue().split "."
     domain            = splittedDomain.first
     tld               = splittedDomain.slice(1).join('')
+    domainName        = domainName.getValue()
 
     domainOptionValue = DomainOption.getValue()
 

            domain.setDomainCNameToProxyDomain()

    else if domainOptionValue is 'existing'
      KD.remote.api.JDomain.createDomain
        domain         : domainName.getValue()
        regYears       : 0
        hostnameAlias  : []
        loadBalancer   :
            mode       : "roundrobin"
      , (err, domain)=>
        createButton.hideLoader()
        if err
          warn err
          return notifyUser "An error occured. Please try again later."
        else
          @showSuccess()
    else if domainOptionValue is 'subdomain'
      KD.remote.api.JDomain.createDomain
        domain         : domainName.getValue()
        regYears       : 0
        hostnameAlias  : []
        loadBalancer   :
            mode       : "roundrobin"
      , (err, domain)=>
        createButton.hideLoader()
        if err
          warn err

        else
          @showSuccess()

  createDomain:(params, callback)->
    KD.remote.api.JDomain.createDomain
        domain         : params.domainName
        regYears       : params.regYears
        hostnameAlias  : []
        loadBalancer   :
            mode       : "roundrobin"
      , (err, domain)=>
        callback err, domain

  clearSuggestions:-> @suggestionBox?.destroy()

