diff --git a/slixmpp/plugins/xep_0004/stanza/form.py b/slixmpp/plugins/xep_0004/stanza/form.py
index 84c89173..c04193f0 100644
--- a/slixmpp/plugins/xep_0004/stanza/form.py
+++ b/slixmpp/plugins/xep_0004/stanza/form.py
@@ -48,7 +48,8 @@ class Form(ElementBase):
fields = self.get_fields()
for var in fields:
field = fields[var]
- del field['type']
+ if field['type'] != 'hidden':
+ del field['type']
del field['label']
del field['desc']
del field['required']
@@ -74,7 +75,8 @@ class Form(ElementBase):
for option in options:
field.add_option(**option)
else:
- del field['type']
+ if field['type'] != 'hidden':
+ del field['type']
self.append(field)
return field
diff --git a/tests/test_stanza_xep_0060.py b/tests/test_stanza_xep_0060.py
index d05bc3d0..671f9cd0 100644
--- a/tests/test_stanza_xep_0060.py
+++ b/tests/test_stanza_xep_0060.py
@@ -314,7 +314,7 @@ class TestPubsubStanzas(SlixTest):
-
+
http://jabber.org/protocol/pubsub#node_config
diff --git a/tests/test_stream_xep_0060.py b/tests/test_stream_xep_0060.py
index da543f96..a5fd0bdc 100644
--- a/tests/test_stream_xep_0060.py
+++ b/tests/test_stream_xep_0060.py
@@ -72,7 +72,7 @@ class TestStreamPubsub(SlixTest):
whitelist
-
+
http://jabber.org/protocol/pubsub#node_config
@@ -210,7 +210,7 @@ class TestStreamPubsub(SlixTest):
-
+
http://jabber.org/protocol/pubsub#subscribe_options
@@ -358,7 +358,7 @@ class TestStreamPubsub(SlixTest):
-
+
http://jabber.org/protocol/pubsub#node_config
@@ -441,7 +441,7 @@ class TestStreamPubsub(SlixTest):
-
+
http://jabber.org/protocol/pubsub#publish-options
@@ -622,7 +622,7 @@ class TestStreamPubsub(SlixTest):
-
+
http://jabber.org/protocol/pubsub#subscribe_options