diff --git a/CTFd/forms/users.py b/CTFd/forms/users.py
index 1013b20e..13c8e0a1 100644
--- a/CTFd/forms/users.py
+++ b/CTFd/forms/users.py
@@ -40,8 +40,7 @@ def build_custom_user_fields(
else:
form_field.render_kw = {"data-initial": initial}
- entry = (field.name, form_field)
- fields.append(entry)
+ fields.append(form_field)
return fields
diff --git a/CTFd/themes/admin/templates/macros/forms.html b/CTFd/themes/admin/templates/macros/forms.html
new file mode 100644
index 00000000..520f0059
--- /dev/null
+++ b/CTFd/themes/admin/templates/macros/forms.html
@@ -0,0 +1,25 @@
+{% macro render_extra_fields(fields, show_labels=True, show_optionals=True, show_descriptions=True) -%}
+ {% for field in fields %}
+
+ {% if show_labels %}
+ {{ field.label }}
+ {% endif %}
+
+ {% if show_optionals %}
+ {% if field.flags.required is false %}
+ Optional
+ {% endif %}
+ {% endif %}
+
+ {{ field(class="form-control") }}
+
+ {% if show_descriptions %}
+ {% if field.description %}
+
+ {{ field.description }}
+
+ {% endif %}
+ {% endif %}
+
+ {% endfor %}
+{%- endmacro %}
\ No newline at end of file
diff --git a/CTFd/themes/admin/templates/modals/users/create.html b/CTFd/themes/admin/templates/modals/users/create.html
index 2c2fa3bf..f477c28f 100644
--- a/CTFd/themes/admin/templates/modals/users/create.html
+++ b/CTFd/themes/admin/templates/modals/users/create.html
@@ -1,4 +1,5 @@
{% with form = Forms.users.UserCreateForm() %}
+{% from "admin/macros/forms.html" import render_extra_fields %}