Commit 4cf03e30 by Tom Christie

Do not render HTML output for hidden fields. Closes #2410.

parent e59b3d17
...@@ -410,6 +410,9 @@ class HTMLFormRenderer(BaseRenderer): ...@@ -410,6 +410,9 @@ class HTMLFormRenderer(BaseRenderer):
}) })
def render_field(self, field, parent_style): def render_field(self, field, parent_style):
if isinstance(field, serializers.HiddenField):
return ''
style = dict(self.default_style[field]) style = dict(self.default_style[field])
style.update(field.style) style.update(field.style)
if 'template_pack' not in style: if 'template_pack' not in style:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment