diff --git a/app/static/js/hosts.js b/app/static/js/hosts.js
index 8b455197e2de6691810e785f6a5c04d669cdf0b5..8594adc5560361b70c19b80725bfc2387a0628e0 100644
--- a/app/static/js/hosts.js
+++ b/app/static/js/hosts.js
@@ -24,6 +24,25 @@ $(document).ready(function() {
     update_available_ips();
   });
 
+  // Enable / disable item_id field depending on type
+  // Item can only be assigned for physical hosts
+  $("#type").on('change', function() {
+    var host_type = $(this).val();
+    if( host_type == "Physical" ) {
+      $("#item_id").prop("disabled", false);
+    } else {
+      $("#item_id").val("");
+      $("#item_id").prop("disabled", true);
+    }
+  });
+
+  // Prefill interface name with hostname
+  $("#name").keyup(function(event) {
+    var hostname = $(this).val();
+    console.log(hostname);
+    $("#interface_name").val(hostname);
+  });
+
   var hosts_table =  $("#hosts_table").DataTable({
     "ajax": function(data, callback, settings) {
       $.getJSON(
diff --git a/app/templates/_helpers.html b/app/templates/_helpers.html
index 30a990c858617deff3c1b2082300dad0f331c32b..acc9431f8f88e63ea25cde383e5902d6f56cd26e 100644
--- a/app/templates/_helpers.html
+++ b/app/templates/_helpers.html
@@ -18,7 +18,6 @@
 
 {% macro render_field(field) -%}
   {% set field_class = kwargs.pop('class_', '') + ' form-control' %}
-  {% set readonly = kwargs.pop('readonly', False) %}
   {% if field.errors %}
     {% set field_class = field_class + ' is-invalid' %}
   {% endif %}
@@ -26,7 +25,7 @@
   <div class="form-group row">
     {{ field.label(class_="col-sm-2 col-form-label") }}
     <div class="col-sm-10">
-      {{ field(class_=field_class, readonly=readonly) }}
+      {{ field(class_=field_class, **kwargs) }}
       {% if field.description %}
         <small class="form-text text-muted">
           {{ field.description|safe }}
diff --git a/app/templates/networks/create_host.html b/app/templates/networks/create_host.html
index db52aecce4e5cd74f6d9382166b59cbefca00e7a..a60b7c7e17ff4dc320625b346e0408584e6a1502 100644
--- a/app/templates/networks/create_host.html
+++ b/app/templates/networks/create_host.html
@@ -20,7 +20,7 @@
     {{ render_field(form.name, class_="text-lowercase") }}
     {{ render_field(form.type) }}
     {{ render_field(form.description) }}
-    {{ render_field(form.item_id) }}
+    {{ render_field(form.item_id, disabled=True) }}
     {{ render_field(form.network_id) }}
     {{ render_field(form.ip) }}
     {{ render_field(form.interface_name, class_="text-lowercase") }}